Home > Mobile >  Azure DevOps API Test results
Azure DevOps API Test results

Time:04-22

I am new to azure DevOps and trying to get all test Results in C# for a project. So far it worked with workItems, does anyone know how it can be done with test results

I followed this :

https://github.com/microsoft/azure-devops-dotnet-samples

CodePudding user response:

does anyone know how it can be done with test results?

From this SO thread, it says that it's not possible.

But we can use the REST API to get a test result for a test run:

GET https://{instance}/{collection}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?api-version=5.0

Here you can see the Examples of sample Request and Response.

CodePudding user response:

To get all the test results in your project, you can try like as below:

  1. Use the REST API "Runs - List" to list all the test runs in the specified project on Azure DevOps.
  2. Use the RESI API "Results - List" in a loop to list all the test results for in each test run.
  • Related