Generate Tests from Subagents and Actions
Evaluate how well your agent handles key subagents and actions before launch. Generate relevant, test-ready utterances using your subagent and action metadata as well as information from connected data libraries. Simply choose the subagents you want to test, define the test focus with a brief description, and let the system generate up to 100 test cases.
Required Editions
![]() This article applies to: |
Legacy Agentforce Testing Center in Setup |
![]() This article doesn’t apply to: |
New Testing Center in Agentforce Builder (beta) |
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type. |
| User Permissions Needed | |
|---|---|
| To create tests in the Testing Center: | Manage AI Agents AND the required permissions for your agent type |
-
To create test cases from subagents and actions, select Generate test cases based
on subagents and actions.
Note Test cases are drafted in the Agentforce Agent's default language. For supported languages, see Considerations for Testing Center. - Specify how many test cases you want to generate. You can generate up to 100 test cases at a time.
-
Enter a description to help guide the AI model about the purpose and scope of your
testing.
How does the test description influence my tests?
The test description is included in the prompt and helps guide how your test cases are generated by defining the focus or theme of the test. Keywords and phrases in the description help narrow the domain of information the tests are built around, which is especially useful when your agent uses multiple sources like articles or PDFs.
While you can’t customize the format or complexity of the tests in the description, the more clearly you define the focus using relevant terms and phrases, the more targeted your test cases will be. Although perfect grammar isn’t required, writing it out in complete sentences can help both the AI and human reviewers better understand your intent and improve the relevance of the output.
-
Select the subagents you want to test. Click Next.
Which subagents and actions should I choose?
Agentforce Testing Center identifies the subagents and actions accessible to the agent you're testing and uses this information to create targeted test cases. Test utterances are then drafted based on the subagent and action instructions, aiming to trigger the agents to select them. When these utterances are sent to your agent, we confirm that the agent correctly selected the intended subagent and action.
To assess your agent's overall effectiveness, generate test cases across all available subagents. This comprehensive approach provides a broad understanding of your agent's performance, so you can pinpoint areas of weakness and prioritize further, more targeted testing. By identifying and addressing these pain points early, you can significantly improve your agent's accuracy before deployment.
Alternatively, if you've modified a specific subagent or action, select those subagents to validate the changes and ensure correct behavior. For example, if you've updated the "Refund Request" subagent, you can isolate tests to only that subagent to ensure the changes function as intended, saving time and increasing confidence in your agent's performance.
You can also choose to select a cluster of subagents related to a specific business area. For instance, you might select a group of subagents related to Order Management, like Order Status, Cancel Order, Modify Order, to comprehensively test how your agent handles a customer's end-to-end order-related queries, ensuring a seamless and accurate experience across all touchpoints.



