AI Test Generation
TMS ONE uses AI to automatically generate test cases from your acceptance criteria. This is also powerful for Product Owners and Business Analysts who want to turn user stories and requirements into ready-to-use test cases — without needing to write them manually.How it works
You provide a description of the feature or user story, and the AI generates:- A Gherkin style scenario (Given / When / Then format) for human readability
- Executable step definition code in your chosen programming language (JavaScript, Python, Java, or C#)
Step-by-step guide
1. Navigate to AI Test Generation
From the left sidebar, click AI Test Generation under your project.2. Fill in the generation form
A name for the test case you want to generate.
Example: “User login with valid credentials”
Example: “User login with valid credentials”
Describe the feature or scenario in plain language. The more detail you provide, the better the AI output will be.Example:
Select which module this test case belongs to. This gives the AI context about the area of the application being tested.
Set the priority level for the generated test case.
Optional. Add one or more tags to categorise the test case (e.g.
regression, smoke, ui).3. Generate the test case
Click Generate Test Case. The AI will process your input and return results in the right panel.Understanding the output
Once generated, you’ll see two tabs on the right:Gherkins Preview tab
Displays the test case in Gherkin format — a plain English, structured format using Given / When / Then syntax.Test Code tab
Displays executable step definition code in your chosen language. You can switch languages at any time — the code will regenerate automatically while keeping the Gherkin preview unchanged.Editing the output
Before saving, you can refine the generated test case: To edit the Gherkin preview:- Click the Edit button in the top right of the results panel
- Modify the text directly in the editor
- Click Save Edit to apply your changes
- Use the language selector in the Test Code tab — the code regenerates automatically
- Click Reset on the left form panel to clear everything and start fresh
Saving to your project
When you’re happy with the output, click Save Test Case. The test case will be saved to the selected module in your project and will appear in your test cases list. You can also:- Copy the current tab content to clipboard
- Download the test code as a file (
.js,.py,.java, or.cs)
Tips for better AI output
Write detailed acceptance criteria
Write detailed acceptance criteria
Vague inputs produce vague outputs. Include specific details about what the user does, what the system should do, and what the expected result is. Think of it as a user story with clear acceptance criteria.
Include positive and negative scenarios
Include positive and negative scenarios
Mention both happy path and failure scenarios in your description. For example: “valid credentials should redirect to dashboard; invalid credentials should show an error message”. The AI will generate separate scenarios for each.
Select the right module
Select the right module
The module provides context to the AI. Selecting the correct module (e.g. Login, Checkout, Dashboard) helps the AI generate more relevant test cases.
Regenerate if needed
Regenerate if needed
AI outputs can vary. If the first result isn’t quite right, click Regenerate to get a fresh attempt with the same inputs. You can also tweak your acceptance criteria and regenerate.
Permissions
Access to AI test generation is role-based:| Action | Who can do it |
|---|---|
| Generate test cases | Users with Generate permission |
| Regenerate | Users with Regenerate permission |
| Edit the Gherkin preview | Admins and users with Edit permission |
| Save to project | Users with Save permission |
What’s next?
Running Tests
Execute your generated test cases in a test run
Writing Test Cases Manually
Prefer to write test cases yourself? Here’s how