QueryRequest allreleases = new QueryRequest("release");
allreleases.setQueryFilter(new QueryFilter("project", "=", project_ref));
QueryResponse resp = restApi.query(allreleases);
if(resp.wasSuccessful()){
System.out.println("list of all the release numbers available...");
for(JsonElement result : resp.getResults()){
System.out.println(result.getAsJsonObject().get("Name").getAsString());
if(result.getAsJsonObject().get("_refObjectName").getAsString().equals("release 1")){
System.out.println("Sdsadsad");
temp_ref = result.getAsJsonObject().get("_ref").getAsString();
System.out.println(temp_ref);
}
}
}
JsonObject updatt = new JsonObject();
updatt.addProperty("release", temp_ref);
UpdateRequest req1 = new UpdateRequest(testset_ref, updatt);
UpdateResponse resp1 = restApi.update(req1);
if(resp1.wasSuccessful()){
System.out.println("release added to testset");
}
我正在使用这段代码对已经创建的测试集进行更新(添加“发布”)。代码运行但发布字段没有得到更新。我不知道我做错了什么。有什么提示吗?
谢谢。