I am using the azure DevOps API to update the test results automatically after test automation run. From the documents, I am able to update the overall outcome of the test case using the below API. But I have a requirement to update each test step outcome result as well for which I didn't find any help in azure documentation. Is there a way to update test case steps outcome using Azure DevOps API? API used to update the test case outcome is https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/update?view=azure-devops-rest-5.1
0
votes
Hi @Rajeev nair Did you check out below answer? please let me know if there is any question.
– Levi Lu-MSFT
@LeviLu-MSFT Since the API is not available to update the test step outcome, we have raised it as a request and now its converted as a feature request developercommunity.visualstudio.com/content/problem/929411/… developercommunity.visualstudio.com/idea/935832/… Unfortunately there is no sufficient vote to prioritize this issue implementation
– Rajeev nair
1 Answers
0
votes
The test case steps is defined in actionResults of TestIterationDetailsModel in iterationDetails of the Request body TestCaseResult.
You can first use Get test results Api and specify the detailsToInclude=Iterations
to get the detailed iterationDetails
and actionResults
information of the TestCaseResults. And then you can construct your Request body and modify the iterationDetails
and actionResults
outcome according the TestCaseResults.
"https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?detailsToInclude=Iterations&api-version=5.1"
I found an example to update the test step result in C# client API, you can check it out. Hope above helps.