Study guide

7.1 Testing an Agent with Testing Center

Salesforce Certified Agentforce Specialist Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & How Agentforce Agents Work

1.1 Agentforce Specialist (AI-201) Exam Facts & Spring '26 Blueprint 1.2 How an Agent Works & the Building Blocks of Agent Script 1.3 Hybrid Reasoning: Agent Script in Canvas View and Script View

2 Chapter 2: Deterministic Control, Topics (Subagents) & Actions

2.1 Deterministic Behavior: Filters, Variables & Template Expressions 2.2 Standard and Custom Topics (Subagents) 2.3 Standard and Custom Agent Actions

3 Chapter 3: Agent Types, Security Context, Channels & Agent API

3.1 When to Use an Employee Agent or a Service Agent 3.2 Security Context: Who the Agent Runs As and How It Affects Actions 3.3 Connecting Agents to Channels: Digital Experiences, Email, Voice & Slack 3.4 When to Use the Agent API

4 Chapter 4: Prompt Builder Fundamentals

4.1 When to Use Prompt Builder 4.2 Access Controls Governing Prompt Templates 4.3 Prompt Template Types: Field Generation, Flex & More 4.4 Creating, Activating & Executing Prompt Templates

5 Chapter 5: Grounding, Prompt Best Practices, Trust Layer & Model Access

5.1 Choosing the Right Grounding Technique 5.2 Best Practices for Writing Effective Prompts 5.3 Einstein Trust Layer Security and Privacy Features 5.4 Managing and Preventing Access to Specific Models

6 Chapter 6: Data 360 Fundamentals for Agentforce

6.1 Agentforce Data Library: Types and Concepts 6.2 Chunking: Breaking Content Into Retrievable Units 6.3 Indexing and Search Types: Vector, Hybrid & Keyword 6.4 Retrievers: Individual, Ensemble & Filtered Retrieval

7 Chapter 7: Testing Agents with Testing Center

7.1 Testing an Agent with Testing Center 7.2 How Testing Center Evaluations Work

8 Chapter 8: Deploying Agents and Prompt Templates

8.1 Deploying an Agent from Sandbox to Production 8.2 Deploying Prompt Templates from Sandbox to Production

9 Chapter 9: Governance and Observability

9.1 Managing and Monitoring Agents 9.2 Agent Analytics and Agent Optimization

10 Chapter 10: Multi-Agent Orchestration, MCP & A2A

10.1 When a Multi-Agent Architecture Is Appropriate 10.2 Open Multi-Agent Protocols: MCP and A2A

7.1 Testing an Agent with Testing Center

Key Takeaways Explain This Topic AI

Testing Center batch-tests agents across many scenarios and supports turn-level and conversation-level tests.

Running tests consumes requests and credits, and testing agents can modify CRM data, so Salesforce recommends using Testing Center only in a sandbox.

You can generate up to 200 test cases at a time from subagents and actions or from knowledge sources, or upload a CSV with up to 1,000 tests per file.

Turn-level CSV columns include a required Utterance plus optional Expected Subagent, Expected Actions, Expected Response, conversation history, and context variables.

Agentforce Builder offers Simulate mode, which doesn't change org data, and Live Test mode, which runs real actions, along with a Trace panel for debugging.

Last updated: September 2026

7.1 Testing an Agent with Testing Center

Quick Answer: Agentforce Testing Center runs batch tests that simulate many conversations with your agent at once and score the results. Build a test suite , add test cases by generating them from subagents and actions , generating them from knowledge sources , or uploading a CSV , choose scorers , and run. Because AI agents are non-deterministic, broad batch testing catches problems that one-at-a-time preview misses. Run tests in a sandbox : tests consume credits and can modify CRM data .

Why Batch Testing Is Required

LLM-based agents can respond differently to similar inputs, so a handful of manual chats doesn't prove readiness. Testing Center helps you:

Evaluate response accuracy, conversation quality, subagent recognition, action execution, and knowledge retrieval at scale

  • Surface patterns and edge cases that small-scale testing misses
  • Catch regressions after changing instructions, actions, or knowledge
  • Build evidence for a deployment decision

Salesforce's testing strategy guidance says to define agent success before you test . Tie the test plan to outcomes your organization tracks, so you don't measure what's easy and quietly redefine success.

Two Places Testing Center Appears

  • New Testing Center in Agentforce Studio (Beta) Legacy Testing Center in Setup
  • Tests Agents (simulated conversations) and prompt templates (batch inputs) Agents
  • Interface Spreadsheet-style grid with scorers, test history, inline editing Setup-based test runs

Permissions to create tests Manage Agentforce Grids AND Manage Agentforce Testing Manage AI Agents plus the permissions for your agent type

Automation Testing Center API and Agentforce DX Metadata API test definitions and CLI

The concepts (test cases, expected subagents and actions, scorers) are the same in both.

Test Scope: Turn-Level vs. Conversation-Level

Scope What a test case represents Default scorers

Turn-level A single utterance and the agent's response Response Evaluation, Subagent Assertion, Action Assertion

Conversation-level A scenario a simulated user follows across multiple turns (up to 20 turns per uploaded conversation) Task Resolution, Subagent Evaluation, Actions Evaluation

Conversation-level tests can use customer personas that simulate background noise, natural conversation flow, accents and phonetic spelling, incomplete information, and verification issues. Output can be text only or text and voice , with an audio recording of the simulated call. Employee agents support text outputs only.

Test Conditions

Condition Options

Data Access Mode Live data runs against your active environment, including real CRM data, actions, and external connections; use it for final pre-deployment sign-off. Mocked data runs in an isolated environment with no external calls or org changes; use it while iterating. Conversation-level testing doesn't support mocked data

Conversation history Adds a column for prior turns, as a JSON array of role and message pairs

Context variables Adds a column per selected field, such as Lead Name, to simulate realistic context. Conversation-level testing doesn't support context variables

  • Three Ways to Build Test Cases
  • 1. Generate from subagents and actions

Select the subagents to test and enter a description that focuses the test theme.

Generate up to 200 test cases at a time , drafted in the agent's default language .

The generator reads subagent and action instructions and writes utterances designed to trigger each subagent and action. Results confirm whether the agent selected them.

AI can generate test cases for Account, Lead, Opportunity, and Contact . For custom objects or Answer Questions with Knowledge , include specific guidance and sample utterances in the description.

The description is for focus and scope only . Don't include a test count, a specific subagent name, or phrases like "generate test cases."

Strategy: test all subagents for a baseline, only changed subagents after an update, or a cluster of related subagents (such as order status, cancel, and modify) for end-to-end journeys.

2. Generate from knowledge sources

Available when the agent is connected to a Data Library based on Knowledge articles and fields or uploaded files . Custom retriever and web libraries aren't supported.

Produces question-and-answer style tests from that content, up to 200 at a time.

Supports turn-level testing only .

3. Upload a CSV

Download the template for your chosen scope and conditions, fill it in, and upload it (up to 1,000 tests per file ).

  • Turn-level column Required? Notes
  • Utterance Required The user input
  • Expected Subagent Optional Used to evaluate routing
  • Expected Actions Optional A Python-style list, for example ['GetRecordDetails', 'SummarizeRecord']

Expected Response Optional A reference response used to score output. Write the actual expected reply , not instructions about it

  • Conversation History Optional A JSON array of prior turns
  • Context Variable [Field] Optional One column per selected variable

Conversation-level CSVs use a required Conversation column (a plain-language scenario description) plus optional expected actions, expected subagents, history, and context variables.

Tip: Download AI-generated test cases as CSV, refine them, and re-upload. That's faster than writing everything by hand.

Manual Testing in Agentforce Builder

Batch testing complements, but doesn't replace, manual testing:

Mode Behavior Use it for

Simulate Verifies configuration without changing your data or org ; can use mock data Early iteration on logic and instructions

Live Test Runs the actions and changes your org Checking real behavior before activation

The Trace panel is the reasoning debugger. It shows selected subagents, triggered actions, subagent transitions, and variable value changes. The Interaction Summary shows subagent selection, action execution, and reasoning, and you can ask the Agentforce assistant to explain any step. You can test drafts, committed, active, and inactive versions.

Loading diagram... A practical agent testing loop

Other Testing Center Facts

Multi-agent solutions: an Agent Handoff Evaluation column shows whether the orchestrator handed off to the expected connected subagent (Pass or Fail).

Automation: the Testing Connect API offers endpoints to start a run, get status, and get results ( .../einstein/ai-evaluations/runs ), using test definitions deployed through Metadata API. Agentforce DX can also run agent tests from the CLI.

Prompt templates: the new Testing Center batch-tests a template version across uploaded inputs with scorers such as coherence, completeness, factuality, and instruction following.

Generation time: generating tests can take from a few minutes to several hours. Refresh the suite to see test cases.

Exam Traps

Testing Center isn't "safe by default." Live tests can modify CRM data, so use a sandbox.

Knowledge-source generation is turn-level only and needs a Knowledge or file library.

Expected Response must be the answer itself, not "the agent should be polite."

Simulate mode doesn't change data; Live Test mode does.