您可以更新
the last test result
对于特定的测试用例,则
outcome
-
首先获取最后一个测试运行ID。(使用RESTAPI)-
Get a list of
test runs
)
-
使用restapi更新特定的测试结果。
PATCH https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results?api-version=5.0-preview.5
请求正文
[
{
"id": 100000,
"state": "Completed",
"outcome": "Passed"
}
]
请看
Update test results for a test run
详情。
您可以引用类似的线程:
Changing the outcome field of testcases within a test suite in Tfs
更新:
如果您只想将一个测试用例标记为
Passed
或
Failed
POST http://SERVER:8080/tfs/DefaultCollection/{ProjectName or ID}/_api/_testManagement/BulkMarkTestPoints
Content-Type : application/json
Request Body:
{"planId":36,"suiteId":38,"testPointIds":[5],"outcome":3}
-
你可以得到
Plan Id
,
Suite Id
引用
)
-
您可以使用下面的restapi来获取
testPointIds
:
GET http://SERVER:8080/tfs/DefaultCollection/{ProjectName or ID}/_apis/test/Plans/36/Suites/38/points
-
2
方法
通过
3
方法