SpecSync Documentation
Getting StartedConfigurationGuidesDownloads
Azure DevOps
Azure DevOps
  • Introduction to SpecSync for Azure DevOps
  • Getting started
    • Getting started using SpecFlow
    • Getting started using Cucumber or other Gherkin-based BDD tool
  • Installation & Setup
    • Install as .NET tool
    • Install as .NET Console App
    • Install as native binaries for Linux or macOS
    • Install as Docker image
    • Setup and Configure
  • Features
    • Push features
      • Pushing scenario changes to Test Cases
      • Configuring the format of the synchronized test cases
      • Synchronizing Scenario Outlines
      • Add new Test Cases to an Area or an Iteration
      • Mark Test Cases as Automated
      • Setting Test Case state on change
      • Update Test Case fields
      • Attach files to Test Cases using tags
      • Customization: Setting Test Case fields with default values
      • Customization: Update custom Test Case fields on push
      • Customization: Ignoring marked Test Case steps
      • Customization: Ignoring Test Case Tags
      • Customization: Ignore non-supported local tags
      • Customization: Mapping tags
      • Customization: Synchronizing scenarios from feature branches
      • Customization: Reset Test Case state after change
      • Customization: Automatically link changed Test Cases
      • Customization: Synchronize linked artifact titles
      • Customization: Add Test Cases to Suites
      • Customization: Do not synchronize title
    • Pull features
      • Pulling Test Case changes to local scenarios
    • Common synchronization features
      • Configuration key
      • Remote scope
      • Linking Work Items using tags
      • Synchronizing Test Case hierarchies using Test Suites
      • Include synchronized Test Cases to a Test Suite (deprecated)
      • Excluding scenarios from synchronization
      • Synchronization conflict resolution
      • Re-link scenarios to new Test Cases
    • Test result publishing features
      • Publishing test result files
      • Support for Azure DevOps Test Plan / Test Suite based test execution
      • Customization: Publishing test results to multiple Test Suites
    • General features
      • Azure DevOps authentication options
      • Configuration file
      • Hierarchical configuration files
      • Local test case conditions
      • Configuration wizards
      • SpecSync plugins
    • Customizations
    • Plugin list
  • Licensing
  • Guides
    • What is my Azure DevOps project URL?
    • How to define the local feature-set to be synchronized
    • Filters and scopes
    • How to synchronize automated test cases
    • How to use SpecSync from build or release pipeline
    • How to publish test results from pipelines using the VSTest task
    • How to use the SpecSync Azure DevOps pipeline tasks
    • How to link GitHub pull requests
    • How to upgrade to a newer version of SpecSync
    • How to attach files to test results
    • Using SpecSync with SpecFlow+
    • Using SpecSync with Cucumber
    • Using SpecSync with Cypress
    • Using SpecSync with Postman
    • Using SpecSync with TestNG
    • Using SpecSync on macOS or Linux
    • Using SpecSync inside a Docker container
    • How to handle Test Cases of multiple parallel application releases
    • Migrating from SpecSync v3 to v5
    • Migrating from SpecSync v2 to v3
    • Migrating from SpecSync v1 to v2
  • Changelog
  • Release Model and Roadmap
  • Downloads
  • Reference
    • Command line reference
      • init
      • upgrade
      • push
      • pull
      • publish-test-results
      • re-link
      • version
    • Configuration reference
      • toolSettings
      • local
      • remote
      • knownRemotes
      • synchronization
        • push
        • pull
        • automation
        • state
        • areaPath
        • iterationPath
        • links
        • attachments
        • format
        • fieldUpdates
      • hierarchies
      • publishTestResults
      • specFlow
      • reqnroll
      • customizations
    • Compatibility
    • Older versions
  • Contact
    • SpecSync Support
    • Troubleshooting
    • FAQ
  • Project Website
Powered by GitBook
On this page
  • Creating a new Test Plan with the existing Test Cases
  • Creating a new Test Plan with clones of existing Test Cases

Was this helpful?

  1. Guides

How to handle Test Cases of multiple parallel application releases

PreviousUsing SpecSync inside a Docker containerNextMigrating from SpecSync v3 to v5

Last updated 2 years ago

Was this helpful?

For some applications or products the development team need to maintain multiple main product versions. For example, you need to keep maintaining v1 of the product (provide bugfixes, etc.) although you have already released v2 as well.

Handling such multiple versions in source code is easy with branching, but if your source code is connected to different work items in Azure DevOps (including Test Cases), you have to consider your release strategy, because Azure DevOps work items do not support having multiple parallel active versions or linking to a specific history item of a work item.

For the requirement work items, teams usually make categories of release-dependent and release-agnostic work items. For example, the User Story work item always belongs to a release (created, completed and closed within a release), but the feature work item is independent of the release and you have to refer the same feature from multiple releases.

This problem is especially interesting for Test Cases, because although the same Test Cases usually have to be verified for multiple releases, they might also need to be changed to match the new capabilities of the new release. For example, in case of a new v2 release after a v1, the following cases are possible:

  • Regression: Test Case of v1 is valid and needs to be verified for v2

  • Revised regression: Test Case of v1 is valid, but needs a slight modification to be verified in v2 (e.g. add a new preparation step)

  • New functionality: A new Test Case is added for v2 that did not exist in v1

  • Removed functionality: Test Case of v1 is not valid anymore for v2

In Azure DevOps, the test cases can be grouped to Test Plans and be organized within a Test Plan into Test Suites. Both Test Plans and Test Suites contain only a reference to the Test Cases, so if a Test Case changes, the changes became automatically visible in all Test Plans and Test Suites where they are included.

A general recommendation of the to maintain a separate Test Plan for the Test Cases in case you have to maintain multiple releases. In case of a new v2 release, this can be established by

  • creating a new Test Plan for v2 that refers to (contains) the same Test Cases as the v1 Test Plan, or

  • creating a new Test Plan for v2 that contains a cloned version of the existing Test Cases of v1

Both options have advantages and disadvantages. In the following sections we detail these strategies and describe how they can be used with Test Cases synchronized by SpecSync.

Regardless of the approach you choose, be careful with requirement-based Test Suites that are made for release-agnostic work items (e.g. a feature) or with query-based Test Suites that do not include a clause that filters for the release the Test Case is related to (e.g. iteration path). These suites might be able to include Test Cases into the Test Plans implicitly that are not valid for that release.

Creating a new Test Plan with the existing Test Cases

This approach is more practical when the old versions have to be supported for a short period of time only (at least with Test Case level traceability) or when the existing tests are changing over releases rarely.

To be able to achieve this model, when a new release is started, you need to

  • Create a new Test Plan or use the "Copy test plan" function of Azure DevOps using the "Reference existing test cases" setting.

  • Make sure that all existing Test Cases are included, except the ones related to removed functionality and remove the related scenarios as well from the feature files.

  • Change the specsync.json configuration file on the branch of the new release and specify a Test Suite in the new Test Plan

  • Synchronize the scenarios with SpecSync from the new release branch - this will add/remove the test cases from the Test Suite in the Test Plan of the release.

Revised regression: If a scenario needs to be changed in the new release then you might run into a "ping-pong" effect, since the synchronization from the different release branches would always change the related Test Case to the version on that release. To avoid that, you have the following options

  1. You don't synchronize the scenarios (or at least the changed scenarios - marked with a tag) in the old release. This might sound bad, but if the old release is mainly kept for hotfixes only, the scenarios are usually anyway not affected. Of course the Test Cases will be updated by the new release and you will see these updated version even if you browse the Test Case from the Test Plan of the old release, but this might be an acceptable inconsistency.

  2. You duplicate the Test Cases of the changed scenarios. This can be done by simply remove the @tc tags (e.g. @tc:1234) from these scenarios and running the SpecSync push command. This command will create a new Test Case for the scenario, remove the old Test Case from the configured Test Suite and add the new to it. Since the old Test Case remain unchanged, the old release will stay as it is.

Creating a new Test Plan with clones of existing Test Cases

This approach is more practical if you need to make parallel maintained releases rarely, but those releases have more active development.

To be able to use this model, when a new release is started, you need to

  • Create a new Test Plan or use the "Copy test plan" function of Azure DevOps using the "Duplicate existing test cases" setting.

  • Review the changes in your local repository: The re-link command will update the feature files with the new link tags and also update the specsync.json configuration accordingly (update Test Plan and Test Suite references).

  • Synchronize the scenarios with SpecSync from the new release branch - this will enable change tracking for the cloned Test Cases.

If the "Copy test plan" function cannot be used to clone the Test Cases, alternatively you can delete all Test Case link tags from the scenarios (using a regular-expression based search-and-replace function of your IDE), update the specsync.json configuration file to refer to a new (empty) Test Suite, and perform a push synchronization with SpecSync.

This will generate new Test Cases based on the scenarios, so essentially they will be the clones of the previous Test Cases.

Let SpecSync duplicate the Test Cases of changed scenarios and keep the reference to the old Test Case as well in the feature file. For this, you have to enable the , where you can define a tag prefix for the new release (called branch tag, e.g. tc-rel-2) that takes precedence over the default prefix. When a scenario is detected to be changed and there is no branch tag on the scenario yet, SpecSync will create a new Test Case with the changed details and add a branch tag to the scenario, but keeps the old tag as well. If the scenario happens to change again, the Test Case referred by the branch tag is updated. (Since branch tags can handle one base and one branch tag, when starting a new release, the branch tags has to be replaced by the core tag. I.e. when Release 3 is started, all @tc-rel-2:1234 like tags should be replaced by @tc:1234 and the old @tc tag has to be removed.)

The "Copy test plan" feature of Azure DevOps can be used to generate clones of the Test Cases. In order to re-link the scenarios to the Test Case clones, the SpecSync can be used that has been introduced in SpecSync v3.3.

Invoke the SpecSync re-link command from the the branch of the new release and optionally specify the ID of the clone operation you have performed (if you have cloned the Test Plan only once, SpecSync will detect that single clone operation anyway). See more information about the re-link command on the page.

Azure DevOps documentation
branch-tag feature
"re-link" command
Re-link scenarios to new Test Cases