Reuse Steps and Scenarios
The AI Test Engineer can reuse steps or entire scenarios helps reduce duplication, improve consistency, and simplify maintenance as tests grow.
Automatic Step Reuse Suggestions
The AI Test Engineer automatically checks for existing steps that match your actions.
Perform an action during recording.
If the beginning of your action matches a previously recorded step, a reuse prompt appears.
Click Use existing step to insert the original implementation instead of creating a duplicate.
Manually Reuse Steps
You can manually insert existing steps without re-recording them.
Open the AI Recorder and start editing your scenario.
In Recording Mode, click the Reuse steps/scenarios icon.
In the steps panel:
- All previously recorded steps are available.
- Steps relevant to the current screen appear at the top with a ⭐ marker.
- Use the search bar to find steps quickly.
Select the step(s) to reuse.
From the dropdown, choose how to apply them:
- Add and Run Step (default): Adds and executes the step immediately.
- Add Step: Adds the step without running it.
- Run Step: Executes the step without adding it.
If the step has parameters, enter the required values.
The selected step runs (if applicable) and is added to your test.
NOTE
After reusing steps or scenarios, Generate Code and Save to keep your changes.
Manually Reuse Entire Scenarios
The AI Recorder also supports executing a previously created scenario.
Currently, scenarios are run but not added to the current test.
NOTE
This functionality is a work in progress and will be expanded to allow full scenario reuse in the future.
Advanced: Reuse with BDD Scenarios
Advanced users can reuse steps more directly by creating scenarios in the Features page.
Open the scenario containing the step(s) you want to reuse.
Copy the relevant steps.
NOTE
To reuse an entire scenario, select and copy all its steps.
Create or open the target scenario, then click Edit.
Paste the steps into the Gherkin editor and click Save scenario.
- If the step is already implemented, a green check mark appears.
- If the step comes from another project, generate automation for it.
TIP
See Generate Automation Code for Gherkin Steps for details.
- If the step is already implemented, a green check mark appears.
Extend with Recording
You can continue building by switching back to the Recorder:
Open the new scenario and click Edit Recording.
On the last reused step, select Run Until This Step.
Record new steps to extend the scenario.
This method combines the speed of copying steps with the flexibility of the Recorder. It works best if you are familiar with both the Gherkin editor and Recorder flow.
Best Practices
TIP
- After every reuse, run the test once to confirm that parameters and flows work correctly.