---
schema_version: "1"
id: a7526123a76eb898d971dfaf856e0d43ce4942fd84cae6a638eb45f4f74788cc
title: Generate Tests from Knowledge Sources
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_studio_testing_center_knowledge_sources.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_studio_testing_center_knowledge_sources.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0dce14872afc963ef53c149e587323f85b7f51f169709a3d1ce66edf0d91f5ac
description: When your agent is connected to an Agentforce Data Library, you can generate test scenarios directly from the content linked to that library. You can base test cases on multiple data sources including articles and knowledge fields or uploaded files.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Generate Tests from Knowledge Sources

When your agent is connected to an Agentforce Data Library, you can generate test scenarios directly from the content linked to that library. You can base test cases on multiple data sources including articles and knowledge fields or uploaded files.

### 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_studio_testing_center_knowledge_sources__image_ewv_dvs_c3c"><!-- --></a>
              <div><img id="agent_studio_testing_center_knowledge_sources__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;">New Testing Center in Agentforce Studio (Beta)</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;"><a name="agent_studio_testing_center_knowledge_sources__image_qxv_cvs_c3c"><!-- --></a>
              <div><img id="agent_studio_testing_center_knowledge_sources__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;">Legacy Agentforce Testing Center in Setup</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="d23748e123">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d23748e123 ">To create tests in the Testing Center:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d23748e123 ">
              <p>Manage Agentforce Grids</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Manage Agentforce Testing</p>
            </td>

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

To get started define the test focus with a brief description, and have the system generate test cases. The testing center generates question-and-answer style test cases based on the knowledge content available to the agent.

![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 Generate Tests from Knowledge Sources supports turn-level testing only. Conversation-level testing isn't supported for this data type.

1. To create test cases from your knowledge, select **Generate test cases based on knowledge available to this agent**.
    
    ![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 You can generate tests only for agents connected to data libraries based on knowledge articles and fields, or file uploads. Agents connected to data libraries based on custom retrievers or web sources aren't supported.
    
    ![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 Test cases are drafted in the Agentforce Agent's default language. For supported languages, see [Considerations for Testing Center](https://help.salesforce.com/s/articleView?id=ai.agent_testing_center_considerations.htm&type=5&language=en_US).
2. Specify how many test cases you want to generate. You can generate up to 200 test cases at a time.
3. Enter a description to help guide the AI model about the purpose and scope of your testing. Click **Next**.
    
    **How does the test description influence my tests?**
    
    The test description is included in the prompt and guides how your test cases are generated by defining the test focus or theme. Keywords and phrases in the description help narrow the information that tests are built around, which is especially useful when your agent is linked to multiple sources like articles or PDFs.
    
    While you can’t customize the format or complexity of tests in the description, you can help define the test focus by using relevant terms and phrases. Although perfect grammar isn’t required, using complete sentences to write out the descripton helps both AI and human reviewers understand your intent and improves the output's relevance.

![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 Generative AI can generate test cases for Account, Lead, Opportunity, and Contact objects. With specific instructions in the description, it can also create test cases for custom objects and the Answer Questions with Knowledge action. For example, for custom objects, use a description similar to this: “Generate test cases for \[custom object name\]. Sample utterances are: \[sample utterance related to custom object\], \[sample utterance related to custom object\].” To have AI create test cases for the Answer Questions with Knowledge action, use a description similar to this: “Generate test cases for the Answer Questions with Knowledge action. Use the following knowledge articles for generating tests: \[title of an article\], \[title of an article\].”