Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用rally rest api和java将更多测试用例附加到测试集_Java_Rest_Api_Rally - Fatal编程技术网

如何使用rally rest api和java将更多测试用例附加到测试集

如何使用rally rest api和java将更多测试用例附加到测试集,java,rest,api,rally,Java,Rest,Api,Rally,如何使用rally rest api和java将更多测试用例附加到测试集 我想向该测试集中添加更多的测试用例。到目前为止,我只能将测试用例集合添加到测试集中 如果我必须向一个测试集中再添加几个测试用例怎么办?如果您将要附加到测试集中的测试用例添加到一个数组中,那么您可以使用CollectionUpdateRequest和updateCollection方法更新测试集 JsonArray testCaseRefs = new JsonArray(); JsonObject testCaseRef

如何使用rally rest apijava将更多测试用例附加到测试集

我想向该测试集中添加更多的测试用例。到目前为止,我只能将测试用例集合添加到测试集中


如果我必须向一个测试集中再添加几个测试用例怎么办?

如果您将要附加到测试集中的测试用例添加到一个数组中,那么您可以使用
CollectionUpdateRequest
updateCollection
方法更新测试集

JsonArray testCaseRefs = new JsonArray();
JsonObject testCaseRef = new JsonObject();
testCaseRef.addProperty("_ref", "/testcase/12345");
testCaseRefs.add(testCaseRef);

CollectionUpdateRequest testsetTestCasesCollectionAddRequest = new CollectionUpdateRequest("/testset/23456/testcases", testCaseRefs, true);
CollectionUpdateResponse testsetTestCasesCollectionAddResponse = restApi.updateCollection(testsetTestCasesCollectionAddRequest);

有关更多信息,请访问,

我厌倦了上述方法,我面临以下错误。线程“main”java.io.IOException中的异常:HTTP/1.1 405找不到?/testset/208970644908/add.js的web服务?使用请求方法?POST?。但是,在该路径上确实存在使用方法?GET?的服务。很抱歉,我在URL中遗漏了/testcases。上述方法对我有效,谢谢。