Update test results test step level in Azure DevOps during test execution through automation scripts

0 votes

My automation framework is writtin in Java, Selenium and I am able to integrate my automation code using NUnit solution. When I execute my scripts in agent, I am not able to post the step level status to test case in test plan. Please help with any readymade solution in this case.
Also what is better way to run parallel execution in this scenario?

Aug 21, 2020 in DevOps on Cloud by Anand
• 120 points

recategorized Aug 21, 2020 by MD 1,016 views


Can you explain your query a bit more? Like which DevOps tool you are using to build your script. And share your script and errors here.

1 answer to this question.

0 votes

To address the issue of posting step-level status to test cases in Azure DevOps Test Plans and to improve parallel execution for your Java Selenium automation framework, consider the following solutions:

1. Posting Step-Level Status to Test Cases:

Unfortunately, NUnit doesn't directly integrate with Azure DevOps Test Plans for reporting step-level status. However, you can achieve this by customizing your test execution process to send status updates to Azure DevOps using Azure DevOps REST APIs. Here's a high-level approach:

  • Within your test code, capture the status of each test step.
  • Use Azure DevOps REST APIs to update the corresponding test case with the status of each step.
  • You can use Azure DevOps SDKs or directly make HTTP requests to interact with Azure DevOps APIs from your Java code.

You'll need to handle authentication and authorization for accessing Azure DevOps APIs securely. Here's the documentation to guide you through the process: Azure DevOps REST API Reference.

2. Running Parallel Execution:

Parallel execution can significantly reduce the overall test execution time. For Java Selenium automation, you have multiple options for parallel execution:

  • TestNG: TestNG provides built-in support for parallel execution. You can configure TestNG to run tests in parallel at the suite, class, or method level.
  • JUnit 5: JUnit 5 also supports parallel execution through its @Execution annotation. You can specify different execution modes to run tests in parallel.
  • Selenium Grid: Selenium Grid allows you to distribute tests across multiple machines or VMs, enabling parallel execution. You can set up a Selenium Grid with a hub and multiple nodes to execute tests in parallel.

Here's a general approach to running tests in parallel:

  • Divide your test suite into smaller, independent test classes or methods.
  • Configure your testing framework (TestNG, JUnit, etc.) to run tests in parallel.
  • Set up your Azure DevOps pipeline to distribute tests across multiple agents or VMs for parallel execution.
  • Ensure that your tests are designed to be thread-safe and don't have dependencies that could cause conflicts during parallel execution.

Implementing these solutions can enhance your automation framework's capabilities in Azure DevOps, improve test reporting, and reduce test execution time through parallel execution.

answered Apr 29 by anonymous
• 1,380 points

Related Questions In DevOps on Cloud

0 votes
1 answer

How can we publish html test reports in azure devops build results?

This might help you. Have a look ...READ MORE

answered Oct 12, 2020 in DevOps on Cloud by Kriti

edited Oct 27, 2021 by Sarfaraz 8,352 views
0 votes
1 answer
0 votes
1 answer

What is the correct way to setup Azure Artifacts in Azure DevOps?

Refer: https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-maven?view=azure-devops this will show you how to create ...READ MORE

answered Apr 5, 2022 in DevOps on Cloud by narikkadan
• 63,700 points
0 votes
0 answers

How to delete unwanted artifacts in Azure DevOps

Numerous NuGet packages are created by our ...READ MORE

Dec 13, 2022 in DevOps on Cloud by Edureka
• 13,620 points
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP