A test utterance without an expected outcome is only sample traffic. Testing criteria convert it into an assertion about routing, tool use, and the response the user should receive.

Separating these expectations matters because a polished answer can conceal the wrong subagent or a missing action, while a correct action can still produce an unacceptable response.

Agentforce testing template with test inputs and expected outcomes
Official Salesforce visual used as a product reference. Source:Salesforce Trailhead — Set Up Testing Criteria

Define observable expectations

  • Specify the expected subagent when correct routing is part of the workflow.
  • List actions that must run, actions that may run, and actions that must never be available.
  • Describe response criteria in terms of required facts, prohibited claims, tone, and escalation behavior.
  • Use source-of-truth data and stable preconditions so failed tests are diagnosable.

Write stronger test cases

  1. Start each case with a business scenario, preconditions, utterance, and expected result.
  2. Add near-boundary values and paraphrases rather than repeating the same happy path.
  3. Mark critical safety and financial assertions separately from quality preferences.
  4. Version criteria alongside the agent behavior they validate.
Further reading

Resources

This article is based on the following Salesforce learning and product documentation.

Continue the architecture path
ObservabilityExplore Agent Testing Tools

Compare preview modes, session tracing, test suites, and evaluation criteria.

ObservabilityView Testing Center Results

Read subagent, action, and response evaluation pass rates.

ObservabilityPrototype the Agent

Validate instructions and actions in a focused prototype before expanding scope.