A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/devops/test/associate-automated-test-with-test-case below:

Associate automated tests with test cases - Azure Test Plans

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Visual Studio 2022 | Visual Studio 2019 | Visual Studio 2017 | Visual Studio 2015

Associating automated tests with test cases can enhance your testing process by providing better traceability and integration with your CI/CD pipeline. This article guides you through the scenarios where associating automated tests with test cases is beneficial and how to do it effectively.

Prerequisites Category Requirement Project access Project member. Access levels - To view test-related work items or run test cases: At least Basic access. Users with Stakeholder access have no access to Test Plans.
- To exercise the full range of test-related features: Basic + Test Plans access level or one of the following subscriptions:
- Enterprise
- Test Professional
- MSDN Platforms Permissions - To add or modify test plans, test suites, test cases, or other test-based work item types: 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: 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, or change test configurations associated with test suites: Manage test suites permission set to Allow under the corresponding Area Path.
- Project-level permissions that you might need include:
- To view, create, or delete test runs: View test runs, Create test runs, and Delete test runs permission set to Allow.
- To manage test configurations or test environments: Manage test configurations and Manage test environments.
- To add new tags to test-based work items: Create tag definition permission set to Allow.
- To move test-based work items out of a project: Move work items out of this project permission set to Allow.
- To delete or restore test-based work items: Delete and restore work items permission set to Allow.
- To permanently delete test-based work items: Permanently delete work items permission set to Allow.

For more information, see Manual test access and permissions.

Create a test project and build pipeline

Do the following steps to create a test project and build pipeline.

  1. Create a test project containing your automated test. For more information, see what types of tests are supported.
  2. Check your test project into an Azure DevOps.
  3. Create a build pipeline for your project and ensure that it contains the automated test. For more information, see what the differences are if you're still using a XAML build.
Associate your automated test in Visual Studio

Consider using Visual Studio to associate automated tests with a test case in the following scenarios:

Do the following steps to associate your automated test with a test case in Visual Studio.

  1. Open your solution in Visual Studio Enterprise or Professional 2017 or a later version.

  2. If you don't know the identifier of the work item for the test case, locate the test case in Azure Test Plans , or query for the work item in the Work hub.

  3. When you know the identifier of the work item for the test case:

    If you're using Visual Studio 2017 or later version, do the following steps to associate your tests.

    The dialog shows a list of test cases currently associated with the selected test method. You can't associate more than one test method with a test case, but you can associate a test method with more than one test case.

    If you're using the build and release services in Azure DevOps, not a XAML build, you can run associated tests in the build and release pipelines by using the Visual Studio Test task. You can't run tests on-demand using Microsoft Test Manager unless you're using a XAML build.

    The parameters in a test case aren't used by any automated test that you associate with a test case. Iterations of a test case that use these parameters are for manual tests only.

For more information, see the following articles:

Associate your automated test in Azure DevOps Associate your test from a build pipeline
  1. Navigate to Pipelines and choose a pipeline where the automated tests ran.

  2. Choose the build in which your tests were executed.

  3. In the Tests tab, look for the automated test you wish to link with a manual test case.

  4. Select the test and then click on Associate Test Case.

  5. Locate the manual test case you want to associate to the automated test and click Associate.

After you associate your automated tests with their corresponding test cases, you can utilize the Azure Test Plan task to execute them as part of a pipeline.

FAQs about associating automated tests

See the following frequently asked questions (FAQs).

Q: What types of tests are supported?

A: The following capabilities and limitations exist for each test type:

Framework *Association in Visual Studio Association in Azure DevOps Coded UI tests Supported Supported Selenium Supported Supported MSTest v1/v2 Supported Supported NUnit Supported Supported xUnit Supported Supported Python (PyTest) Not Supported Supported Java (Maven and Gradle) Not Supported Supported

* Supported in Visual Studio 15.9 Preview 2 or later.

Tests that use the .NET core framework can be associated with a test case work item when using Visual Studio 15.9 Preview 2 or later. Run the .NET core tests. The appropriate target framework must be specified in a .runsettings file.

Q: Can I use tests from my GitHub repositories for association in Azure DevOps?

A: As long as you run your automated tests in Azure Pipelines with the VSTest task, or you report the test results with the PublishTestResults task, the automated tests will be available for association to test cases, via the user experience in Azure DevOps. Please keep in mind that the test must run at least once before it becomes available for association.

Q: What are the differences if I'm still using a XAML build?

A: If you're using a XAML build in Azure Pipelines, you can run tests that you associated in a Build-Deploy-Test workflow using a Lab environment. You can also run tests using Microsoft Test Manager and a Lab environment.

Q: Can I configure work items to open in Visual Studio?

A: Yes. If you want test work items to open inside Visual Studio instead of the default Azure Pipelines UI in your web browser, change the Work Items | General setting from the Tools | Options menu in Visual Studio.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4