如何在 Rally 中使用 ESAPI 添加多个测试用例结果?
How to add mutiple test case results using WSAPI in Rally?
我可以使用 /testcaseresult/create
API 添加单个测试用例结果并将 JSON 传递为:
{
"testcaseresult":
{
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase":{"_ref":"https://rally1.rallydev.com/slm/webservice/v2.0/TestCase/12345678"},
"Verdict":"Pass"
}
}
有没有办法添加多个测试用例结果?
您可以使用 wsapi 批处理端点同时创建多个项目:
post url: https://rally1.rallydev.com/slm/webservice/v2.0/batch
post正文:
{
"Batch": [
{
"Entry": {
"Path": "/testcaseresult/create",
"Method": "POST",
"Body": {
"testcaseresult": {
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase": "/TestCase/12345678",
"Verdict":"Pass"
}
}
}
},
{
"Entry": {
"Path": "/testcaseresult/create",
"Method": "POST",
"Body": {
"testcaseresult": {
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase": "/TestCase/1234",
"Verdict":"Fail"
}
}
}
}
]
}
我可以使用 /testcaseresult/create
API 添加单个测试用例结果并将 JSON 传递为:
{
"testcaseresult":
{
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase":{"_ref":"https://rally1.rallydev.com/slm/webservice/v2.0/TestCase/12345678"},
"Verdict":"Pass"
}
}
有没有办法添加多个测试用例结果?
您可以使用 wsapi 批处理端点同时创建多个项目:
post url: https://rally1.rallydev.com/slm/webservice/v2.0/batch
post正文:
{
"Batch": [
{
"Entry": {
"Path": "/testcaseresult/create",
"Method": "POST",
"Body": {
"testcaseresult": {
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase": "/TestCase/12345678",
"Verdict":"Pass"
}
}
}
},
{
"Entry": {
"Path": "/testcaseresult/create",
"Method": "POST",
"Body": {
"testcaseresult": {
"Build":5,
"Date":"2017-02-27T18:03:29.260Z",
"Testcase": "/TestCase/1234",
"Verdict":"Fail"
}
}
}
}
]
}