如何在 Rally 中使用 WSAPI 添加多个测试用例结果?

问题描述 投票:0回答:2

我可以使用

/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"
    }
 }

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

web-services rally wsapi
2个回答
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"
                     }
                }
            }
        }
    ]
} 

0
投票

如何使用 Rally api 获取 testCase _ref id?

© www.soinside.com 2019 - 2024. All rights reserved.