1

我可以使用/testcaseresult/createAPI 添加单个测试用例结果并将 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"
    }
 }

有没有办法添加多个测试用例结果?

4

1 回答 1

2

您可以使用 wsapi 批处理端点同时创建多个项目:

发帖网址:https://rally1.rallydev.com/slm/webservice/v2.0/batch

帖子正文:

{
    "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"
                     }
                }
            }
        }
    ]
} 
于 2017-02-28T19:56:38.320 回答