ASK

How to create a test suite in Azure DevOps?

gopal@91ninjas.com gopal@91ninjas.com | Last updated: January 7, 2025 |

To create a test suite in Azure DevOps:

  1. Open your Test Plan in the Test Plans section.
  2. Click the New dropdown and choose the type of test suite:
    • Static Suite: Organize test cases manually.
    • Requirement-based Suite: Link test cases to requirements or user stories.
    • Query-based Suite: Group test cases automatically based on a query.
  3. Fill in the required details and click Save to add the suite to your test plan.

How to create automated test cases in Azure DevOps?

  1. Integrate Azure DevOps with a Test Automation Tool: Integrate a test automation framework such as Selenium, Postman, or a unit testing tool with Azure DevOps through CI/CD pipelines.
  2. Link Automated Tests to Test Cases: Navigate to the Test Plans section in Azure DevOps and select an existing test case or create a new one. In the test case details, go to the Automation tab and link the test case to an automated test method from your source code repository by specifying the correct test method name and path.
  3. Set Up Automation in Your Build/Release Pipeline: Go to the Pipelines section in Azure DevOps and create or edit a pipeline to include the execution of automated tests as part of the build or release process. Use tasks like Visual Studio Test or custom scripts to trigger the automated tests.

How to run automated test cases in Azure DevOps?

To run automated test cases in Azure DevOps:

  1. Ensure Automation is Set Up: Make sure your automated test cases are linked to the appropriate test cases in Azure DevOps and your pipeline is configured to run these tests (e.g., using tools such as Selenium, NUnit, or JUnit).
  2. Create or Edit a Pipeline: Go to the Pipelines section in Azure DevOps and create a new pipeline or edit an existing one. Add tasks like Visual Studio Test, DotNetCoreCLI, or custom scripts to trigger the automated tests during the build or release process.
  3. Link Tests to the Pipeline: In your pipeline configuration, specify the location of the test project and the test method to run. You may need to include the task to restore dependencies, build the project, and run the tests.
  4. Run the Pipeline: Trigger the pipeline manually or automatically based on commits or other triggers. The automated tests will execute as part of the pipeline, and results will be available in the Test Plans or Runs tab.
  5. View Results: After execution, check the Test Plans or Runs tab for test results, logs, and insights into the test execution status.