Test Builder (Automation Scripts)
The Test Builder allows you to generate executable Playwright automation scripts from your manual test cases using AI. Instead of writing automation code by hand, you describe your test steps and the AI generates a ready-to-run script in your chosen language.How it works
You provide test steps, a target URL, and optional test data scenarios. The AI generates a Playwright automation script that can be executed directly from TMS ONE. Results are tracked in Execution History.Quickest way: Automate directly from a test case
The fastest way to generate an automation script is directly from your test cases list — no need to navigate to the Test Builder manually.- Go to Test Cases in your project
- Find the test case you want to automate
- Click the magic wand icon (Automate) in the Actions column
- You’ll be taken straight to the Test Builder with the test case pre-linked and details pre-populated
- Add the Page URL, review the steps, and click Generate Test Script
Creating an automation script from scratch
1. Navigate to Test Builder
From the left sidebar, click Test Builder under your project.2. Link an existing test case (optional)
You can link an existing manual test case to pre-populate the form and maintain traceability between your manual and automated tests.3. Fill in the generation form
A name for the automation script.
Example: “Login flow - valid credentials”
Example: “Login flow - valid credentials”
The full URL of the page being tested.
Example:
Example:
https://yourapp.com/loginDefine the actions the automation should perform. Each step has three parts:
Click + Add Step to add more steps.
| Field | Description | Example |
|---|---|---|
| Action | What to do | click, type, verify, scroll |
| Selector | The element to target | #email, button[type='submit'] |
| Text | Data key or value | email, password |
Optional. Add multiple test data combinations to run the same script with different inputs. Each row is a separate scenario.Example:
You can also import scenarios from a CSV file.
| Scenario Title | password | |
|---|---|---|
| Valid admin login | admin@company.com | Admin123! |
| Valid user login | user@company.com | User123! |
Optional. Associate the script with a module in your project.
Optional. Set a priority for this automation script.
Optional. Link Jira tickets if your Jira integration is configured.
4. Generate the script
Click Generate Test Script. The AI will produce a Playwright script based on your inputs, shown in the right panel.5. Review and edit
You can edit the generated script directly in the code editor before saving. This is useful for adjusting selectors, adding assertions, or tweaking logic.6. Save the script
Click Save Test Script. The script is saved to your project’s script history and is ready to execute.Managing saved scripts
Navigate to Test Builder → History to see all saved automation scripts for your project. From the history list you can:- View the full script and its metadata
- Edit the script code and update it
- Execute one or more scripts
- Delete scripts you no longer need
Executing automation scripts
1. Select scripts to run
In the history list, use the checkboxes to select one or more scripts.2. Click Execute
Click the Execute button. The scripts are queued and run via the Playwright service.The Execute button is disabled while a run is already in progress. You’ll see an “Execution is in progress” indicator until it completes.
3. View results
Once execution completes, go to UI Test Runs to see pass/fail counts and download the full HTML report.Tips for better automation
Use stable selectors
Use stable selectors
Prefer IDs (
#elementId) or data attributes ([data-testid='login-btn']) over class names. These are less likely to break when the UI changes.Keep scripts focused
Keep scripts focused
Each script should test one flow. Avoid combining unrelated actions — it makes failures harder to diagnose.
Use scenario data for data-driven tests
Use scenario data for data-driven tests
Instead of creating multiple scripts for similar flows, add multiple rows to the scenario table. The same script runs once per scenario with different data.
Link to your manual test case
Link to your manual test case
Linking a script to its manual test case keeps your test suite organised and makes it easy to trace which automation covers which requirement.
What’s next?
Execution History
View automation execution results and download reports
Running Tests Manually
Prefer manual execution? Here’s how