---
schema_version: "1"
id: fbcc153004792bcc43ed0225b3d09456ebab02473a83a8d8e556c48068cbb76d
title: Define Test Conditions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_testing_center_test_conditions.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_testing_center_test_conditions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c635a364cb5fdc9b193f70e06082627b7b2447a9c1101512abd2c29a7563b9cb
description: 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.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="agent_testing_center_test_conditions__image_ewv_dvs_c3c"><!-- --></a>
              <div><img id="agent_testing_center_test_conditions__image_ewv_dvs_c3c" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/resources/images/checkmark.png" alt="green checkmark"></div>
              <p style="margin-bottom:0;"><strong>This article applies to:</strong></p>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Legacy Agentforce Testing Center in Setup</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="agent_testing_center_test_conditions__image_qxv_cvs_c3c"><!-- --></a>
              <div><img id="agent_testing_center_test_conditions__image_qxv_cvs_c3c" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/resources/images/crossmark.png" alt="red crossmark"></div>
              <p style="margin-bottom:0;"><strong>This article doesn’t apply to:</strong></p>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">New Testing Center in Agentforce Studio (Beta)</td>

          </tr>
        </tbody>
      </table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d197547e123">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197547e123 ">To create tests in the Testing Center:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197547e123 ">Manage AI Agents AND <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;type=5&amp;language=en_US" target="_blank">the required permissions for your agent
                type</a></td>

          </tr>
        </tbody>
      </table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

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.](https://help.salesforce.com/s/articleView?id=service.bots_service_context_system_variables.htm&type=5&language=en_US)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    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

- [Agent Variables](https://help.salesforce.com/s/articleView?id=ai.agent_variables.htm&release=264.0.0&type=5 "To improve security and ensure consistent agent behavior, use variables in filters, instructions, and as input for actions. You can use variables to control how your agent uses subagents and actions and to provide more information about a conversation.")