如果您正在针对测试用例结果创建 REST 端点执行简单的 POST:
https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult/create
那么适当的 XML 负载将是:
<TestCaseResult>
<Build>2345</Build>
<Date>2012-12-11T23:05:49.365Z</Date>
<TestCase ref="/testcase/12345678910"/>
<Tester ref="/user/12345678911"/>
<Verdict>Pass</Verdict>
</TestCaseResult>
其中长整数是结果关联的测试用例的 ObjectIVE,以及作为测试者的 Rally User。
我还将包含 JSON 语法,因为 Webservices 2.0 将仅包含 JSON:
https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult/create.js
Payload:
{ "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。