更新 Azure 测试计划中的测试用例结果状态

Update test case outcome status in azure test plans

我想更新 Azure 测试计划中的测试用例结果状态。我怎样才能做到这一点? 我只找到了如何获取有关测试计划的信息,但没有针对每个测试用例进行更新。

I want to update test case outcome status in azure test plans. How can I do this?

当您手动更新天蓝色测试计划中的测试用例结果状态时,您可以去测试运行和select更多选项:

如果您想使用 REST API 更新测试用例结果状态,您可以尝试使用以下 REST API Results - Update:

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

请求正文:

[
  {
    "id": 100000,
    "state": "Completed",
    "comment": "Website theme is looking good",
    "associatedBugs": [
      {
        "id": 30
      }
    ]
  },
  {
    "id": 100001,
    "state": "Completed",
    "comment": "Website links are failing because of incorrect container id",
    "failureType": "Known Issue"
  }
]