Rally 使用 Web 服务 API 批量添加测试用例结果 [英] Rally add test case results in bulk using web services API

查看:40
本文介绍了Rally 使用 Web 服务 API 批量添加测试用例结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们即将开始通过 api 在 Rally 中更新测试结果的阶段.

We are about to start the phase of updating test results in Rally via the api.

我找不到通过 Web 服务 API 执行此操作的示例(例如发布 xml).谁能指出我这一点?

I couldn't find an example to do this via the web services API (e.g. posting xml). Can anyone point me to this?

我还想知道有什么能力可以批量执行此操作,例如一次性上传一组测试结果.也许有连接器可以将各种测试结果标准(例如 JUnit 报告)上传到 Rally?

Also I wondered what ability there is to do this in bulk, e.g. upload a set of test results in one go. Perhaps there are connectors for this that will upload various test result standards (e.g. JUnit report) into Rally?

欢迎提出想法和想法.

谢谢,

安迪

推荐答案

如果您正在对测试用例结果进行简单的 POST 创建 REST 端点:

If you're doing a simple POST against the Test Case Result Create REST endpoint:

https://rally1.rallydev.com/slm/webservice/1.41/测试用例结果/创建

那么合适的 XML 负载应该是:

Then the appropriate XML payload would be:

<TestCaseResult>
<Build>2345</Build>
<Date>2012-12-11T23:05:49.365Z</Date>
<TestCase ref="/testcase/12345678910"/>
<Tester ref="/user/12345678911"/>
<Verdict>Pass</Verdict>
</TestCaseResult>

其中长整数是结果关联的 TestCase 的 ObjectID,以及作为测试者的 Rally 用户.

Where the long integers are the ObjectID's of the TestCase to which the result associates, and the Rally User that is the tester.

我还将包含 JSON 语法,因为 Webservices 2.0 将仅支持 JSON:

I'll also include the JSON syntax, since Webservices 2.0 will be JSON-only:

https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult/create.js

有效载荷:

{ "TestCaseResult" : {
      "Build" : "2345",
      "Date" : "2011-10-13T23:05:49.365Z",
      "TestCase" : { 
          "_ref" : "/testcase/12345678910.js"
        },
      "Tester" : {
          "_ref : "/user/12345678911.js"
        },
      "Verdict" : "Fail"
    }
}

据我所知,没有用于将 JUnit 结果上传到 Rally 的预构建连接器.一些客户发现 Rally Excel 插件对于批量上传 TestCaseResults 很有用,除其他外.您只需在导入工作表中指定一列,该列具有要关联结果的测试用例的 Rally ObjectID 或 FormattedID.

As far as I'm aware, there's not a pre-built connector for uploading JUnit results into Rally. Some customers find the Rally Excel Add-in to be useful for bulk uploading TestCaseResults, amongst other things. You just have to specify a column in your import worksheet that has the Rally ObjectID or FormattedID of the TestCase(s) to which you want to associate your results.

这篇关于Rally 使用 Web 服务 API 批量添加测试用例结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆