How to get Recent Test Case Results by Test Case ID using TFS REST API

1.7k Views Asked by At

Is there a way to get the recent test results of test case by Test Case ID utilizing TFS REST API (Azure DevOps Services REST API).

Required field is the Outcome of test case, Duration, Date, Configuration and Run By.

Thanks in advance!

1

There are 1 best solutions below

2
On BEST ANSWER

You can try this api to get a specific test case in a test suite with test case id.

GET https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites/{suiteId}/testcases/{testCaseIds}?api-version=5.0

for getting test result please refer below api

GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?api-version=5.0

enter image description here

for further information, you can refer

https://learn.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/get%20test%20case%20by%20id?view=azure-devops-rest-5.0

https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/get?view=azure-devops-rest-5.0

Hope it helps.