Test Case Steps
Our generated tests may include extra steps that are not needed or require a simple update to match your desired flow. Instead of deleting the entire Test Case, you can easily update individual steps using the following options:
- Add Step β Manually insert a new step anywhere in the test.
- Generate More Steps β Use AI to suggest additional steps based on the existing flow.
- Duplicate β Copy a step if the same action is needed elsewhere in the test.
- Delete β Remove any step thatβs no longer relevant.
- Reorder β Drag and drop steps to change their sequence.
These options give you the flexibility to customize and refine your Test Cases without starting from scratch.
List of Test Case Stepsβ
Every Test Case has a Steps
tab that displays its list of steps and their order.
To view this:
- Click on any Test Case
- Open the
Steps
tab
Edit or Add a Test Case Stepβ
You can modify existing steps or add new ones anywhere in your test flow:
- Navigate to the
Steps
tab of your test case - To add a new step:
- Click the
Add Step
button at the bottom of the test case - A form will open for your new step
- Click the
- Complete the following fields:
- Step Description β Write a clear explanation of what this step should do
- Step Type (select one):
- Action β A step that performs an action (clicks, types, etc.); can self-repair its code
- Assertion β A verification step; see Assertions for details
- Code (Optional) β Custom implementation code (if you need to override the AI-generated code)
- To edit an existing step:
- Click directly on the step you want to modify
- The step editor will open with the current values
- Make your desired changes in the form
- Click
Save Steps
to apply all changes
If a Test Case Step has code specified, that's what Qualiti uses to execute it. If no code is present, Qualiti AI interprets the step description instead. If a step isn't working as expected, try removing the code and re-running the test to let AI re-analyze it.
Generate More Stepsβ
Use the Generate More Steps button at the bottom of the test to have Qualiti AI suggest additional actions that logically follow the current sequence. This is a quick way to expand your test without writing new steps manually.
Duplicate a Stepβ
When you need to repeat similar actions in your test case, duplication saves time:
- Navigate to the step you want to duplicate
- Click the ellipsis icon in the right corner of the step
- Select Duplicate from the dropdown menu
- The system will create an exact copy directly below the original step
- If needed, drag the duplicated step to a different position in your test flow
- You can edit the duplicated step to make any necessary adjustments
- Click Save Steps to apply your changes
This feature is especially useful for:
- Creating multiple similar form inputs (e.g., filling out several text fields)
- Performing the same validation at different points in a workflow
- Testing repetitive actions with slight variations
Delete a Stepβ
To remove an unnecessary or incorrect step:
- Click the ellipsis icon to the right corner of the step
- Select
Delete
from the dropdown - Click
Save Steps
to apply your changes
Only the selected step will be removed β the rest of your Test Case remains unchanged.
Reorder Test Stepsβ
To rearrange the execution order of steps:
- Hover over a step and use the drag handle to move it up or down.
- This helps refine the flow without rewriting or recreating steps.
Test Step Codeβ
For most scenarios you'll never need to manually write code, but Qualiti still gives you full control to see and edit the code, just in case you have a special use-case that requires it.
Environmentβ
Qualiti runs your test code using Python 3.11, and interacts with your web application using Playwright 1.50 (sync mode).
In addition to most of Python's builtins, the following identifiers are accessible to test steps' code:
variables
: See docs on Variables- Playwright tools:
browser
: Browser (e.g. Chromium)browser_context
: BrowserContext - similar to a browser windowpage
: Page - similar to a browser tabexpect
: Function used to create a Playwright assertion; see Playwright docs
- Python standard library:
Identifiers from the Python standard library are entire modules, rather than individual classes/functions such as datetime.datetime
or random.random
Test code is not able to import additional modules. If there's another Python tool you'd like to use in Qualiti, let us know!
Use Trace Viewer to Locate Elementsβ
When writing code by hand, you can use the Trace Viewer to help you craft playwright code to interact with the right page element, saving you from manually inspecting the DOM or understanding complex CSS and XPath selectors. This makes it much simpler to include custom but accurate element locators in your test steps.
element = page.locator('[data-testid="button"]')
element.click()
See Playwright's Docs to learn the different ways to locate elements