Define Test Conditions

When you upload test cases from the CSV template, defining test conditions such as conversation history and context variables helps provide additional context. These variables help simulate more realistic user interactions, making your tests more reliable and reflective of actual agent behavior.

Required Editions

green checkmark

This article applies to:

Legacy Agentforce Testing Center in Setup
red crossmark

This article doesn’t apply to:

New Testing Center in Agentforce Studio (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
Important
Important Conversation history and context variables appear only as columns in the downloadable CSV template and are not used when generating test cases.
  1. If you initiate batch tests from Agentforce Builder you can include that conversation history in your test cases. This adds a column for the conversation to your CSV template and testing grid. You’ll need to add the conversation turns manually. To add the builder conversation history to your CSV template, select Include conversation history. You may get different results than you get using the same utterances in an Agentforce Builder session.
  2. To add context variables to your test template, select Include context variables. Context variables map to fields on the objects associated with an agent and add information to your test cases that helps simulate realistic conversations. This adds a column and populates the variables to your CSV template. Select the context fields you want to include and click Next. See Understand Context and System Variables.
    Note
    Note Context variables are important for test accuracy because they establish the runtime state the agent expects to find at the start of a conversation. For example, if your agent uses a context variable to identify the logged-in user or the active case, a test that omits that value may produce a different response than a real user would see or even fail entirely. Providing accurate context variable values for each test case helps ensure that your test results reflect how the agent actually behaves in production.

See Also