Save and compare versions of test scripts

Using a built-in version control system, ALM Octane tracks every saved and labeled version of your manual test steps and your Gherkin test scenarios.

You can use these versions to:

  • Compare revisions you have made.

  • See who made modifications to the test script.

  • Make a version the current one.

  • View and manage the releases assigned to each script revision.

Save versions

ALM Octane tracks the following types of versions. All types of versions are fully supported when comparing, blaming, and reverting.

  • Unlabeled versions. Versions are created implicitly each time you save your steps or scenarios. For automated Gherkin tests, you can also see when the script version is injected from an external source.

  • Labeled versions. You can explicitly create named versions. This is for tracking significant sets of changes.

To explicitly create labeled versions, do the following:

  1. After making changes in the Steps tab (manual tests) or the Script tab (Gherkin test), click Save Version.

  2. Enter a label and click Save.

Back to top

View versions

The first step when working with versions is to see what versions have been created, and the changes each version contains.

  1. In the Steps tab (manual tests) or the Script tab (Gherkin test) for your test, click Versions. The Versions View window is displayed.

  2. By default, only named versions are displayed. To see all versions, clear Show major versions only.

  3. Look at each version.

    For example, for automated Gherkin tests, you can identify whether the script is injected from an external source. In the Revision column, the 3rd digit on the right displays the relevant number, and the Is external column displays Yes. You may need to compare script versions for approval. For details, see Compare versions and Automate Gherkin tests.

    At this point, you can revert to a previous version, compare versions, and see who made the modifications.

  4. Click Close.

Back to top

Revert to a previous version

You can revert to a previous version and continue working from that point.

  1. In the Steps tab (manual tests) or the Script tab (Gherkin test) for your test, click Versions. The Versions View window is displayed.

  2. By default, all versions are displayed. To see only major versions, select Show major versions only.

  3. To "revert" to a previous version, 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, latest version, and your current test script is discarded. The Versions window closes and you are returned to your test.

    Next time you open the Versions window, you see Reverted to and the date and time of the revert, listed as a new version.

  4. Click Close.

Back to top

Compare versions

You can compare any two versions, including unlabeled versions.

For automated Gherkin tests, you may need to compare script versions for approval. For details, see Automate Gherkin tests.

  1. In the Steps tab (manual tests) or the Script tab (Gherkin test), click Versions. The Versions View window is displayed.

    Tip: The order of the versions in the View window determines the initial order of versions when comparing. You can sort by Creation time.

  2. Select one of the versions you want to compare.

  3. Click Compare. The Compare window is displayed, showing the selected version and the one after it, side-by-side.

    The differences between the versions are highlighted in yellow.

  4. Click Close.

Back to top

View and manage releases assigned to versions

You can view each release in which a test was run, and manually manage the releases assigned to each script revision.

When you run a test, the version of the script is automatically associated with the release set up for the run. However, you can manually edit this association in case of a mistake, or if you need to associate a version without running it.

Tip: This is useful when planning and running tests that were executed in previous releases. This allows you to use the script version associated with the previous release—without any of the changes made in later releases.

To add and remove releases associated with a test version:

  1. In the Steps tab (manual tests) or the Script tab (Gherkin test), click Versions. The Versions View window is displayed.

  2. In the Releases column, click in the required row, and select a release from the drop-down list. In the autocomplete search box, you can type numerical values to search for releases.

  3. Click X to remove a release associated with a test version.

Back to top

View annotations

In the Annotations tab, you can see who changed which line in the script.

  1. In the Steps tab (manual tests) or the Script tab (Gherkin test) for your test, click Versions. The Versions View window is displayed.

  2. Click Annotations. The Annotations window is displayed, showing each step or scenario, and the person who last modified it.

  3. Click Close.

Back to top

See also: