Share steps between test cases
Azure Test Plans | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018-2015
When you plan manual tests there are some sequences of steps, such as logging in, that occur in many test cases. To avoid having to enter these sequences again and again, create shared steps.
Prerequisites
You must connect to a project. If you don't have a project yet, create one.
You must be added to a project. To get added, Add users to a project or team.
To view test-related work items, you must have Basic access or higher and permissions to view work items under the corresponding Area Path.
To add test plans and test suites, manual test cases, delete test artifacts, and define test configurations you must have Basic + Test Plans access level or have one of the following Visual Studio subscriptions:
To add or edit test-related artifacts, you must have the following permissions:
- To add or modify test plans, test suites, test cases, or other test-based work item types, you must have Edit work items in this node permission set to Allow under the corresponding Area Path.
- To modify test plan properties such as build and test settings, you must have Manage test plans permission set to Allow under the corresponding Area Path.
- To create and delete test suites, add, and remove test cases from test suites, change test configurations associated with test suites, and modify a test suite hierarchy (move a test suite), you must have Manage test suites permission set to Allow under the corresponding Area Path.
To learn more, see Manual test access and permissions.
Note
If you're new to using Azure Test Plans, review Navigate Test Plans to understand how to use the user interface to access select functions.
Create shared steps
While you're editing a test case, select a sequence of steps that you want to share:

The steps you selected are replaced with a link to the new shared steps work item:

Use shared steps
Now you can use the shared steps in another test case:

A query opens. Run it to find the steps you want to insert:

When you run a test with shared steps
When you run a test, you can either mark the whole shared sequence as passed or failed, or mark each step separately:
