Generate test cases
Tosca Agentic Test Automation allows you to generate test cases with natural language, based on a secure, responsible AI. This speeds up test authoring and helps you optimize existing portfolios.
Tosca Agentic Test Automation can help you create new test cases, but it can't update existing ones.
We recommend using SAP Fiori and web applications for testing.
Prepare the test data file
Before you start generating test cases, you need to create a test data file that tells AI how to generate actionable test steps. Check out our examples to see test data in different formatting styles.
Additionally, consider reusing any manual test cases that you've created. Manual test cases have a built-in structure that improves the AI's accuracy and help avoid problems with vague or poorly written prompts. Simply copy and paste your manual test case into the chat field.
Best practices for test data files
To create the test data file, make sure you do the following:
-
Define clear objectives: Ensure the test data aligns with the specific goals of the test and covers required fields, conditions, and expected outcomes.
-
Use realistic data: Create data that mimics real-world scenarios to simulate actual use cases. This includes normal, boundary, and error conditions.
-
Ensure completeness: Populate necessary fields with appropriate values. Missing data fields will prompt the AI to request user input during the test run.
-
Group related fields: Consolidate related fields into a single group for streamlined data entry during the test run. For example, group customer names and addresses.
-
Maintain consistency: Use consistent formats and conventions for fields like dates, IDs, and numerical values.
-
Validate test data: Review test data for accuracy and ensure it meets the requirements of the test scenario.
Generate your first test case
Now that you've prepared your test data, it's time to utilize Tosca Agentic Test Automation's test generation capabilities. When generating test cases, you can choose between two different modes:
-
Co-create, the default mode, allows you to verify each autonomous step before it's performed, giving you an opportunity to provide Tosca Agentic Test Automation with feedback or new instructions before running the test step.
-
Autonomous mode is the standard mode where Tosca Agentic Test Automation generates steps in sequence until test generation is completed, without your intervention.

Follow these steps to generate a test case using Co-create mode:
- Select Generate a test case in the Tosca Agentic Test Automation window.
- Select the application where you want to generate a test case. We recommend using SAP Fiori applications and web applications.
- Choose Co-create in the bottom of the chat window.
-
Give Tosca Agentic Test Automation a prompt that describes what you want to achieve with this test. Paste test data or upload a test data file (can be a text or JSON file, up to 4 MB).
-
If you're using an SAP Fiori application, Tosca Agentic Test Automation will generate a set of work steps. You can choose to edit the work steps or leave them as they are.
-
Tosca Agentic Test Automation then describes the first test step it will perform and asks if it should proceed. If you'd like to change something, provide feedback so that Tosca Agentic Test Automation can update the test step.
-
Once you give permission to proceed, Tosca Agentic Test Automation performs the test step. Please don't move your mouse during the process. When it's done, you'll receive a browser notification prompting you to return to the automation window.
-
Continue the co-creation process and when you're done, select Save test case. You can find your new test cases on the Test cases page.

Follow these steps to generate a test case using Autonomous mode:
- In the Tosca Agentic Test Automation window, select Generate a test case.
- Select the application where you want to generate a test case. We recommend using SAP Fiori applications and web applications.
- Choose Autonomous in the bottom of the chat window.
-
Give Tosca Agentic Test Automation a prompt that describes what you want to achieve with this test. Paste test data or upload a test data file (can be a text or JSON file, up to 4 MB).
-
If you're using an SAP Fiori application, Tosca Agentic Test Automation will generate a set of work steps. You can choose to edit the work steps or leave them as they are.
-
Start the test case generation:
-
Maximize the window of the application under test.
-
Send your instructions.
-
Step away from your mouse. Please don't move your mouse while Tosca Agentic Test Automation generates test cases.
-
-
When Tosca Agentic Test Automation is done, select Save test cases. You can find your new test cases on the Test cases page.
In this example, you create an SAP sales order:
-
You select the SAP application.
-
You provide the test instructions Create an SAP sales order and upload the test data JSON file.
-
You select Import to Tosca to import the test case to Tosca Cloud.
Manage work steps
Work steps can only be used with SAP Fiori applications.
To use this feature, follow these steps:
- In the Tosca Agentic Test Automation window, select Generate a test case.
- Select the application where you want to generate a test case and confirm that it's an SAP Fiori application.
- Enter your prompt and test data. Tosca Agentic Test Automation generates a set of work steps.
- Select the work steps to review them and then choose to proceed or edit. While editing, you can delete steps or edit the text directly in the work steps.
- When you're satisfied with the work steps, select
send.
Examples of test data
These test data examples provide options for natural language and JSON formatting.
Natural language formatting
The following example test data sets use natural language formatting for SAP Fiori applications and web applications.

Let's say you want to create a sales order. Copy and paste this prompt directly into the chat text field:
Create Sales orders VA01
Here's the test data. Copy and paste this data into a text file and then upload it to Tosca Agentic Test Automation.
Screen: Create Sales Documents
Data:
- Order Type: OR
- Sales Organization: 1000
- Distribution Channel: 10
- Division: 00
Screen: Create Standard Order: Overview
Data:
- Sold-to Party: 1175
- Ship-to Party: 1175
- Cust Reference: Test
- All Items table:
- Item: 2
- Material: M-09
- Order quantity: 5
Or maybe you want to create a purchase order. Copy and paste this prompt directly into the chat text field:
Create purchase order
Here's the test data. Copy and paste this data into a text file and then upload it to Tosca Agentic Test Automation.
1. Search for 'Create Purchase Order'
2. Click on Dropdown, and Click on the Standard PO
3.Fill in the data for the following fields:
-Vendor: 0010300002
-Purch. Org.: 1010
-Purch. Group: 001
-Company Code: 1010
4. In the first table, fill in the first row the following: Material: SF-FL-FORK-L, PO Quantity: 20, Plnt: 1010

Here's the test data. Copy and paste this directly into the chat text field:
Step 1: select the Automobile table
Step 2: Enter Vehicle Data
Action: On the Enter Vehicle Data screen, input the following details:
Make: BMW
kW: 120
Date of Manufacture: 06/19/2023
Number of Seats: 5
Fuel Type: Diesel
List Price: 17500
License Plate Number: WU-1234AT
Annual Mileage: 15000
Expected Result: Vehicle data is entered correctly.
Proceed to Insurant Data
Action: Click on the Next » button.
Expected Result: The Enter Insurant Data screen is displayed.
Step 3: Enter Insurant Data
Action: On the Enter Insurant Data screen, input the following details:
First Name: Rywuzdz
Last Name: Cdxtlpg
Date of Birth: 12/12/1989
Gender: Male
Street Address: Teststraße 123
Country: Austria
Zip Code: 1120
City: Wien
Occupation: Employee
Hobbies: Select 'Speeding'
Action: Click on the Next » button.
Expected Result: The Enter Product Data screen is displayed and direct to the next page.
Step 4: Enter Product Data
Action: On the Enter Product Data screen, input the following details:
Start Date: 07/19/2025
Insurance Sum: 15,000,000.00
Damage Insurance: No Coverage
Merit Rating: Bonus 7
Optional Products: Select 'Euro Protection' and 'Legal Defense Insurance'
Courtesy Car: Yes
Expected Result: Product data is entered correctly.
Step 5: Proceed to Price Option Selection
Action: Click on the Next » button.
Expected Result: The Select Price Option screen is displayed.
Step 6: Select Price Option
Action: On the Select Price Option screen, select the 'Platinum' radio button.
Expected Result: 'Platinum' price option is selected.
Step 7: Proceed to Quote Submission
Action: Click on the Next » button.
Expected Result: The Send Quote screen is displayed.
Step 8: Enter Contact and Account Information
Action: On the Send Quote screen, input the following details:
E-Mail: j.snow@tricentis.com
Phone: 004369911223344
Username: jsnow
Password: Password+12
Confirm Password: Password+12
Comments: OSV rocks!
Expected Result: Contact and account information is entered correctly.
Step 9: Submit the Quote
Action: Click on the « Send XML» button.
Expected Result: The quote is submitted successfully.
Step 10: Confirm Submission
Action: In the Confirmation Dialog, click on the OK button.
Expected Result: Submission confirmation is acknowledged.
Step 11: Return to Home
Action: Click on the Tricentis link in the Confirmation Dialog.
Expected Result: Navigated back to the home page.
JSON formatting
The following example test data sets use JSON formatting and cover various permutations and types of fields. Copy and paste this data into a JSON file and then upload it to Tosca Agentic Test Automation.

{
"Username": "test_user",
"Password": "password123"
}

{
"Customer Details": {
"Name": "John Doe",
"Contact Number": "123-456-7890",
"Email": "john.doe@example.com"
},
"Order Details": {
"Order Type": "Online",
"Payment Method": "Credit Card"
}
}

{
"Order Items Table": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 2,
"Price": 10.00
},
{
"Item": 2,
"Product Name": "Widget B",
"Quantity": 5,
"Price": 20.00
}
]
}

{
"Order Items": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 1,
"Price": 10.00
}
]
}

{
"Order Items": [
{
"Item": 1,
"Product Name": "Widget A",
"Quantity": 2,
"Price": 10.00
},
{
"Item": 2,
"Product Name": "Widget B",
"Quantity": 5,
"Price": 20.00
}
]
}

{
"Credentials": {
"User": "xxx",
"Password": "xxx"
},
"Test Organizational Data": {
"Order Type": "OR",
"Sales Organization": "1000",
"Distribution Channel": "10",
"Division": "00"
},
"Test Sales Order Data": {
"Sold-To Party": "1175",
"Ship-To Party": "1175",
"Cust. Reference": "Customer Test",
"All Items Table": [
{
"Item": 1,
"Material": "M-09",
"Order Quantity": 5
},
{
"Item": 2,
"Material": "M-09",
"Order Quantity": 10
}
]
},
"Outbound Delivery Data": {
"Shipping Point": 1201,
"Selection Date": "11/21/2026"
}
}