I am exploring the Azure Devops APIs to update the outcome of a test case as well as its test steps by accessing the APIs through Postman. I am able to update the outcome of the overall test case and it is getting updated on the Devops portal, https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/update?view=azure-devops-rest-5.1&tabs=HTTP from this doc I have taken the reference.
Now, I want to update the outcome of the individual test steps. I have already added the result in the test run by using the post API with iterationDetails and actionResults in the body. PFB: Reference doc: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/add?view=azure-devops-rest-5.1&tabs=HTTP
Sample body:
[
{
"testCaseTitle": "Test",
"testCase": {
"id": "******",
"name": "Test"
},
"testPoint": {
"id": "879***"
},
"testCaseRevision": 2,
"iterationDetails": [
{
"id": 100000,
"outcome": "PASSED",
"startedDate": "2022-08-31T21:14:14.337Z",
"completedDate": "2022-08-31T21:14:17.057Z",
"durationInMs": 10000.0,
"actionResults": [
{
"actionPath": "1",(I have given the random number, not sure from where I can get it.)
"iterationId": 1,(same as above)
"stepIdentifier": "1",(First test step, that's why given 1)
"outcome": "PASSED",
"startedDate": "2022-08-31T21:14:14Z",
"completedDate": "2022-08-31T21:14:14Z"
},
{
"actionPath": "2",(same as previous)
"iterationId": 1,(same as previous)
"stepIdentifier": "2",(same as previous)
"outcome": "PASSED",
"startedDate": "2022-08-31T21:14:14Z",
"completedDate": "2022-08-31T21:14:14Z"
}
],
"parameters": [],
"attachments": [],
"url": "https://dev.azure.com///_apis/test/Runs/1472***/Results/100***/Iterations/10"
}
]
}
]
But after the execution of this API through postman, the outcome is not getting updated on Devops. kindly suggest any resolution.
Note: I am having only, test plan contributor permission, so not able to add or delete any test cases/test plan, only able to see and execute. I am accessing the Rest APIs through personal access token.