大约两周后,我开始使用我的 java 应用程序,现在每次运行它时都会看到以下异常:
Exception in thread "main" java.io.IOException: HTTP/1.1 500 Internal Server Error
at com.rallydev.rest.RallyRestApi.doRequest(RallyRestApi.java:258)
at com.rallydev.rest.RallyRestApi.doPost(RallyRestApi.java:276)
at com.rallydev.rest.RallyRestApi.update(RallyRestApi.java:155)
at ExportTRtoRally.testresult_to_testset(ExportTRtoRally.java:273)
at ExportTRtoRally.main(ExportTRtoRally.java:453)
如上所示,将测试结果添加到测试集中时会发生这种情况。该应用程序过去一直运行良好。有谁知道它的原因?
这是 testresult_to_testset() 方法:
public static void testresult_to_testset(RallyRestApi r, ArrayList<String> testres_refs, String testset_ref) throws IOException{
System.out.println("\n--------------------------------\nAdding test results to the testset...");
for (String i2 : testres_refs){
JsonObject tingo2 = new JsonObject();
tingo2.addProperty("TestSet", testset_ref);
UpdateRequest req = new UpdateRequest(i2, tingo2);
UpdateResponse resp = r.update(req);
if(resp.wasSuccessful())
System.out.println(resp.getObject().get("_ref").getAsString());
}
System.out.println("----------------------------------\nTestResults successfully added to TestSet\n----------------------------------");
}
谢谢,哈里斯