Concept 13 of 16Run it well

Testing agents: Testing Center, evaluations and red-teaming

Building test sets for subagent selection, actions and answers, conversation-level testing with personas, custom evaluations, regression testing in pipelines, adversarial and safety tests, and acceptance criteria for go-live.

Your confidence:Not rated

Simple explanation

Testing Center (now inside Agentforce Studio)

  • Turn-level tests: utterance β†’ expected subagent, actions and response qualities.
  • Conversation-level tests: simulate full conversations with user personas.
  • Custom evaluations: define your own success criteria and metrics.
  • Run history to compare results over time.

What to test

AreaExamples
SelectionVaried phrasings, typos, other languages
ActionsCorrect inputs, error paths, confirmation before changes
GroundingCorrect facts, citations, refusal when no data
SafetyPrompt injection, other customers' data, harmful requests, off-topic
Hand-offTriggers fire and summaries are useful
ChannelsVoice latency, rich content on web

Process

  • Build tests from real transcripts and FAQs.
  • Run regression on every change (CLI in CI pipelines).
  • Set go-live thresholds (selection accuracy, answer quality, zero critical safety failures).

Real-world analogy

Testing an agent is like mock exams plus fire drills: practise the expected questions, the tricky ones, and what happens when someone tries to cause trouble.

Worked example

Before launch, a retailer ran 600 test utterances and 40 persona conversations, including attempts to get other customers' orders. Go-live required 95% correct subagent selection on the core set and zero critical safety failures; the suite runs automatically on each deployment.

Diagram

Rendering diagram…

Key points

  • Test selection, actions, grounding, safety, hand-off, channels.
  • Conversation-level tests with personas, not just single turns.
  • Custom evaluations for your definition of success.
  • Regression on every change in the pipeline.
  • Set explicit go-live thresholds.

Limits and gotchas

  • LLM outputs vary; evaluate qualities, not exact strings.
  • Test runs consume credits; size suites sensibly.
  • Tests built only by the builders miss real-world phrasing; use real transcripts.

🎀 How to say this in an interview

Describe your test pyramid for agents, thresholds and adversarial tests. Mention running tests in CI with the CLI.

Common follow-ups

How do you test non-deterministic answers?

Evaluate criteria (correct facts, policy compliance, tone, citation present) with rubric or LLM-as-judge scoring, and check distributions over runs.

What's a critical safety failure?

Revealing another customer's data, taking an unauthorised action, or harmful content; any one blocks go-live.