Forum Discussion
Update Test Configuration after Testrun
Hello, I am trying to update/change the Test Configuration of a Testrun.
Via Rest API it is possible to Patch the Test Result, where i can find the Config ID.
Successfully i could update the comment afterwards with
https://dev.azure.com/{organization}/{project}/_apis/test/runs/{testRunID}/Results?api-version=7.0
[
{
"id": 100000,
"comment": "Website theme is looking good"
}
]
But when updating the Config, only the Revision increments but the Config don't change
[
{
"id": 100000,
"configuration":
{
"id": "193"
}
}
]
Is this field changeable or is it read only? According to the microsoft documentation (https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/update?view=azure-devops-rest-7.0&tabs=HTTP#testcaseresult) the configuration is part of the testresult und it should be able to update.
Any Ideas of this?
1 Reply
Try this:
1. Assign Configurations to Test Cases First
-
- Go to the Define tab in Azure DevOps Test Plans.
- Assign one or more configurations to your test cases.
2. Generate Test Points
-
- Each configuration assigned creates a unique test point.
- You can list them using the API:
GET https://dev.azure.com/{organization}/{project}/_apis/test/plans/{planId}/suites/{suiteId}/points?api-version=7.03. Create a New Test Run with Desired Configuration
-
- Use the test point ID that has the configuration you want:
{ "name": "New Run", "pointIds": [12345], "state": "InProgress" }4. Update the Result as Needed
-
- Once the run is created, you can patch other fields like comment, outcome, etc.
-