Create test cases with AI Chat

We added this functionality in a patch. To use AI Chat, you need to install patch 3 or later.

AI Chat replaces Tosca Agentic Test Automation. If you don't install patch 3, you continue to use Tosca Agentic Test Automation.

AI Chat creates test cases from natural-language prompts and speeds up test creation across your portfolio.

Use AI Chat to create test cases for generic web, SAP Fiori, SAP GUI, and Salesforce applications.

This topic shows how to start AI Chat, prepare your prompt, and create a test case from a description.

Before you start

To create test cases with AI Chat, you need the following:

Start AI Chat

To start AI Chat, follow these steps:

  1. Open your Tosca workspace.

  2. In the Home ribbon menu, select Open chat. Note the following:

    • The first time you open AI Chat, Tosca runs initialization tasks. For example, it installs Launcher and prepares context data. This can take some time.

    • Each time you open AI Chat, you briefly see two Launcher windows open and close. Launcher is checking for updates. This is expected.

  3. If you use a Tricentis Server Repository workspace, enter your client ID and client secret.

Prepare your prompt

Everything starts with a prompt. Tell AI Chat what to do, for example what to click or what the result should look like. The better you describe it, the better your test case turns out.

Write the prompt

Write the way you'd explain the task to a colleague. Use the same field names, buttons, and screen titles your application uses so AI Chat knows exactly where to go.

Keep these tips in mind:

  • Cover all the steps you need, including expected outcomes. The more complete your prompt, the better the result.

  • Identify controls precisely. If multiple controls share the same title, text, or image on a screen, specify which one you mean. For example, reference the third button called XYZ or label ABC within tab DEF.

  • Name a target folder if you want the test case saved somewhere specific.

Provide values

Add the values that your test should type in or verify to your prompt, for example IDs, amounts, or table rows. Put the values directly into your prompt.

Structure your values

Keep the values in your prompt clean:

  • Include only the fields and expected outcomes your test needs.

  • Use realistic values and add edge cases where they matter.

  • Fill in all required fields. AI Chat may stop and ask you during the run if something is missing.

  • Group related values together.

  • Keep your date and number formats consistent.

To see how values look in a prompt, check out our prompt examples.

Create a test case from a description

After you prepare your prompt, follow these steps to create a test case from a description:

  1. Start AI Chat.

  2. Open the application you want to create a test case for, and maximize its window.

  3. Send your prompt. Keep your mouse and keyboard still while AI Chat works, so it doesn't lose track of the controls it's steering.

  4. If a step is unclear or requires additional information, AI Chat pauses and asks you a question. Answer the question to allow it to continue.

  5. Find your new test case in the folder you named, or in the Imported ATA TestCases folder if you didn't name one.

Examples of prompts

The following examples show how to write prompts with values included directly in the chat.

What's next

Run your test case in the ScratchBook to check that it works before you add it to an ExecutionList.