When talking about versioning, different things may come to the surface that may somehow be related.

Is it requirements versioning? Test versioning? Are you talking about tracking changes to your artifacts or having explicit versions each time you change an artifact?

Let's see first how Jira handles changes and versions in general and how that approach is feasible also for managing versions of Tests, at least up to some level.

Then we'll see how Xray Enterprise enables proper Test Case Versioning, allowing users to manage multiple versions at the same time for each one of your Tests.

How Jira handles versioning in general

When we talk about versions in Jira, we're usually referring to project releases. Jira issues are assigned to a given project version by specifying the "Fix Versions" field. Additionally, "the "Affects version" can be used to identify that a given issue impacts the mentioned project version/release.

At each issue level, Jira ensures that changes are tracked under the History section available in the corresponding issue screen, so you know who changed what and when. Even though changes are tracked for history and auditing purposes, there is no version management at issue level, where users would be able manage multiple versions of the issue content, including all its fields.

So, how do teams deal with this need, whenever they want to have multiple versions of the same issue?

Usually, these versions are tied up to a new iteration, a new enhancement. As an example, if you have a requirement (e.g., a story) for version v1.0 and you want to change it somehow in a future version (e.g., v2.0), normally, you will have to create another requirement issue to specify the new behavior. This will lead to the creation of additional issues.

However, if you are changing the specification during the development lifecycle of that requirement, you can simply update its description and use Jira workflows to guarantee that is being handled properly.

If you make changes in some of the attributes of an issue, it gets tracked in the History changes; however, the version is not incremented because it is used for another purpose: to tell for which version you're delivering it.


Test Versioning with Xray Standard

Xray can handle the versioning of Tests in the same way as Jira handles the versioning of other issue types. Since Xray's Tests are Jira issues, Xray Standard allows the same approach so your users work the same way they already do.

However, even though you can see all the changes of a Test case using the Jira History tab, it is not easy to revert or view a previous Test version easily unless you create a new Test issue for each version. This is also not ideal, as you end up with multiple issues for the same entity that complicates their management.

Using the Jira way for addressing test versioning, even though feasible and sufficient for most teams, has many limitations if you aim to have a thorough test versioning system in place. 

Tips

Limitations


Although your tests may live across many versions of your project, they're made in the context of some version, most probably for the version of the requirement they aim to validate. Thus, assigning them to a Fix Version serves the purpose of tracking the specification+implementation of the test case, the first time they have been used. This way, you can also track it in the Release as one artifact that needs to be "done" (i.e., specified/reviewed/approved).


In order to overcome these limitations, Xray Enterprise introduced an explicit way of versioning Tests.

Test Versioning with Xray Enterprise

With Test Case Versioning, available only for Xray Enterprise, it is now possible to create new versions within the same Test issue. You can revert back to a specific version and view all versions of a Test case easily.


Please check the Test Case Versioning user documentation page to see how to use this feature.


Test Versions

A Test Version is like a different branch or “variant” of a Test, that has its own specification, test type, and history.

A Test Version is not like an incremental revision or “snapshot of the test at a given moment”, even though users can create a new version of Test using the latest contents of another version.

Main characteristics

Possible use cases for adopting Test Case Versioning

Simultaneously manage multiple variants of the same test

Simultaneously manage multiple versions of the same test, with different content

Test Versions and other entities

Preconditions

Test Sets

Test Plans

Test Executions

Tips

Limitations

Test Case Versioning with Xray Enterprise provides real management capabilities for test versions. However, there are some limitations (some by design and other that can be overcome in the future).

Test Runs and Test versions

No matter the approach you're choosing for managing test versions (the Jira/Xray Standard way or the Xray Enterprise way), it is still important to note that Xray makes a copy of the Test specification whenever you schedule a Test for execution in a Test Execution.

By persisting the Test specification on the Test Runs,  Xray ensures data consistency. The version of the Test executed in a Test Run is persisted in the Test Run itself. That means that if you change a Test specification today, that won't affect your already recorded runs for that Test (unless you want to).


Please have a look at Test Runs for more information on the fields that are persisted at the Test Run level.