Test script versioning
Native version control tracks every saved version of your test.
Save test versions
Different types of versions are used for tests.
Version type | Description |
---|---|
Unlabeled | Versions not named by you. If you do not enter a name, a new test version is created each time you save the test. For automated Gherkin tests, view when the script version is injected from an external source. |
Labeled | Versions named by you. |
To create labeled versions:
-
After making changes in the Steps tab (manual tests) or the Script tab (Gherkin test), click Save Version.
-
Enter a label and click Save.
View versions
It can be useful to view versions for comparison or other reasons.
To view versions of your test:
-
In the Steps tab (manual tests) or the Script tab (Gherkin test) for your test, click the Versions button . The Versions dialog box opens.
-
By default, only named versions are displayed. To see all versions, clear Show major versions only.
-
Look at each version.
For example, for automated Gherkin tests, identify if a script is injected from an external source. In the Revision column, the 3rd digit displays the relevant number, and the Is external column displays Yes.
Revert to a previous version
At times, you may need to revert to an older version of a script.
To revert to previous versions of a script:
-
In the Steps tab (manual tests) or the Script tab (Gherkin test) for your test, click the Versions button . The Versions dialog box opens.
-
Select the version and click Set as latest version.
This creates a new version with the same content as the version you selected. This new version becomes the current and latest version. Your current test script is discarded.
The Versions dialog box closes and you return to your test.
-
Next time you open the Versions dialog box, see Reverted to and the date and time of the revert, listed as a new version.
Compare versions
Comparing versions of tests lets you see what has changed between versions.
To compare test versions:
-
In the Steps tab (manual tests) or the Script tab (Gherkin test), click the Versions button . The Versions dialog box opens.
-
Select one of the versions you want to compare.
-
Click the Compare button . The Compare window is displayed. The selected versions display side-by-side.
The differences between the versions are highlighted.
Manage releases assigned to versions
When you run a test, the version of the script associated with the release assigned in the run details is selected. Edit this association in case of a mistake or if you need to associate a version without running it.
This is useful when planning or running tests from previous releases. Use the script version associated with the previous release without the later changes.
To assign a version to a specific release:
-
In the Steps tab (manual tests) or the Script tab (Gherkin test), click the Versions button . The Versions dialog box opens.
-
In the Releases column, click in the required row, and select a release from the list, or use the search box to search for releases.
See also: