How to Create Shared Steps in Azure DevOps

Creating Shared Steps in Azure DevOps can greatly enhance your testing process by reducing redundancy and improving efficiency. This guide will walk you through understanding, setting up, creating, using, and troubleshooting Shared Steps, ensuring you can leverage this feature to its fullest potential.

Key Takeaways

  • Shared Steps help streamline repetitive tasks in test cases, saving time and effort.
  • Proper permissions and access levels are necessary to create and manage Shared Steps.
  • Shared Steps can be referenced and reused across multiple test cases, enhancing consistency.
  • You can edit Shared Steps centrally, and changes will reflect in all linked test cases.
  • Troubleshooting common issues with Shared Steps involves checking permissions and syncing between TFS and Azure DevOps.

Understanding Shared Steps in Azure DevOps

What are Shared Steps?

Shared Steps in Azure DevOps are a collection of test steps that can be reused across multiple test cases. Instead of writing the same steps repeatedly, you create them once and reference them wherever needed. This makes your testing process more efficient and easier to manage.

Benefits of Using Shared Steps

Using Shared Steps offers several advantages:

  • Consistency: Ensures that the same steps are followed every time, reducing errors.
  • Efficiency: Saves time by eliminating the need to rewrite steps.
  • Easy Maintenance: Update the steps in one place, and the changes reflect everywhere they are used.

Common Use Cases for Shared Steps

Shared Steps are particularly useful in scenarios where the same actions are performed frequently. Some common use cases include:

  • Logging into an application
  • Navigating to a specific page
  • Filling out a form with standard data

Pro Tip: Use Shared Steps for any repetitive actions to streamline your testing process and improve accuracy.

Setting Up Permissions and Access

Required Permissions

Before diving into creating shared steps, you need to ensure you have the right permissions. Basic access or higher is necessary to view work items. Additionally, you need permissions to add or edit test-related artifacts. This includes:

  • Edit work items in this node permission set to Allow under the corresponding Area Path.
  • Manage test plans permission set to Allow under the corresponding Area Path.
  • Manage test suites permission set to Allow under the corresponding Area Path.

For more details, refer to the Azure DevOps documentation on manual test access and permissions.

How to Add Users to a Project or Team

Adding users to your project or team is straightforward. Navigate to your project settings and select ‘Permissions’. From there, you can add new users by entering their email addresses. Assign them the appropriate access level, such as Basic or Basic + Test Plans. This ensures they have the necessary permissions to view and edit work items.

Managing Access Levels

Managing access levels is crucial for maintaining project security and efficiency. You can assign different access levels based on the user’s role. For instance, developers might need Basic access, while testers might require Basic + Test Plans. Regularly review and update these access levels to ensure everyone has the appropriate permissions.

Remember, keeping your permissions and access levels up-to-date is essential for smooth project management and security.

Creating Shared Steps

Navigating to Your Test Plans

First, you need to get to your test plans. Open Azure DevOps and select Test Plans from the menu. You can filter by title or choose from options like Mine or All to find the specific test plan you need. Once you find it, click on it to see the test cases.

Selecting and Creating Shared Steps

Double-click on a test case to edit it. Under the Steps section, select the steps you want to share. Click on the Create shared steps icon. A dialog box will pop up. Enter a name for your shared steps and hit Create. Your selected steps will now be replaced with a link to the new shared steps work item.

Saving and Closing Your Work Item

After creating your shared steps, don’t forget to save your work. Click on Save & Close to save the work item. If you reopen the work item, you can see the shared steps you created. You can edit these shared steps anytime, and any changes will appear in every test case where you use them.

Pro Tip: Use shared steps to reduce redundancy and save time on repetitive tasks. This will make your test management more efficient.

Using Shared Steps in Test Cases

two women talking while looking at laptop computer

Referencing Shared Steps

To use shared steps in your test cases, you need to reference them. This means linking the shared steps to your test case so that they can be reused. This eliminates redundancy and ensures that any updates to the shared steps are reflected across all test cases that use them.

  1. Open the test case you want to edit.
  2. Under the Steps section, click on the Insert shared steps icon.
  3. In the dialog box that appears, run a query to find the shared steps you want to insert.
  4. Select the shared steps and insert them into your test case.

Editing Shared Steps

Editing shared steps is straightforward. When you update a shared step, the changes automatically appear in all linked test cases. This centralized update mechanism saves time and effort.

  1. Navigate to the shared steps work item you want to edit.
  2. Make the necessary changes to the steps and results.
  3. Save and close the work item.

Managing Shared Steps Across Multiple Test Cases

Managing shared steps across multiple test cases can be a bit tricky, but it’s essential for maintaining consistency. Use shared steps to ensure that common sequences are uniform across different test cases.

  • Centralized updates: Edit shared steps once, and the changes reflect everywhere.
  • Reduced redundancy: No need to duplicate steps in multiple test cases.
  • Improved efficiency: Save time by reusing steps.

Remember, shared steps are a powerful feature in Azure DevOps that can significantly streamline your testing process. Use them wisely to get the most out of your test management efforts.

Running Tests with Shared Steps

Executing Tests with Shared Steps

Running tests with shared steps in Azure DevOps is straightforward. When you start a test, the shared steps will appear as a single, linked item. You can choose to mark the entire sequence as passed or failed, or you can mark each step individually. This flexibility allows you to handle complex test scenarios efficiently.

Marking Tests as Passed or Failed

During test execution, you have the option to mark the whole shared sequence as passed or failed. If a single step fails, you can mark that specific step, which will help in identifying the exact point of failure. This feature is particularly useful for troubleshooting and improving test accuracy.

Handling Parameter Placeholders

Shared steps often include parameter placeholders. These placeholders are filled with actual values during test execution. You don’t need to provide values in the shared steps definition, but you can set default values if needed. This ensures that your tests run smoothly and consistently.

Pro Tip: Always double-check your parameter values before running the test to avoid unexpected failures.

Troubleshooting Common Issues

Shared Steps Not Appearing

Sometimes, shared steps might not show up in your test cases. This can be due to a sync issue or a problem with the initial setup. Double-check that the shared steps are correctly linked and saved. If the problem persists, try re-adding the shared steps to your test case.

Permission Errors

Permission issues can prevent users from accessing or modifying shared steps. Ensure that all team members have the required permissions. You can find step-by-step guidance to understand and address issues a user might encounter when connecting to a project or accessing an Azure DevOps service or feature. If problems continue, review the project’s permission settings and adjust as needed.

Syncing Issues Between TFS and Azure DevOps

Syncing issues between TFS and Azure DevOps can cause shared steps to not migrate properly. If you encounter this, try rerunning the import process. Sometimes, running the import twice can resolve the issue. If not, check for any updates or patches that might address the syncing problem.

Having trouble with common issues? Don’t worry, we’ve got you covered! Our website offers a range of solutions to help you troubleshoot and resolve problems quickly. Whether you’re dealing with software glitches or hardware hiccups, our easy-to-follow guides and expert tips will get you back on track in no time. Visit our website to explore more and find the help you need.

Frequently Asked Questions

What are Shared Steps in Azure DevOps?

Shared Steps are a set of actions that you can reuse across multiple test cases in Azure DevOps. They help in reducing redundancy by allowing you to define a sequence of steps once and reference them wherever needed.

Why should I use Shared Steps?

Using Shared Steps helps save time and effort by eliminating the need to duplicate common test steps across multiple test cases. It also simplifies maintenance since updates to Shared Steps automatically apply to all test cases that use them.

How do I create Shared Steps in Azure DevOps?

To create Shared Steps, navigate to your test plans, select the steps you want to share, and click the ‘Create shared steps’ button. Give the shared steps a name, and save your work.

What permissions are needed to create Shared Steps?

You need Basic access or higher, along with permissions to view and edit work items in the relevant Area Path. Additionally, you need the Basic + Test Plans access level, or a Visual Studio subscription like Enterprise or Test Professional.

Can I edit Shared Steps after creating them?

Yes, you can edit Shared Steps. Any changes made to Shared Steps will automatically update in all test cases that reference them, ensuring consistency across your tests.

What should I do if Shared Steps are not appearing in my test cases?

If Shared Steps are not appearing, check your permissions and ensure you have the necessary access levels. Also, verify that the Shared Steps were correctly created and saved in the system.

You may also like...