Skip to content

Commit

Permalink
Skip xml generation when total count is 0 (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou9584 committed Feb 17, 2023
1 parent 7007944 commit 47a5b2a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,13 @@ protected void tearDown(DeviceInfo deviceInfo, TestTask testTask, TestRun testRu
deviceManager.testDeviceUnset(deviceInfo, testRun.getLogger());

//generate xml report and upload files
try {
String absoluteReportPath = xmlBuilder.buildTestResultXml(testTask, testRun);
testRun.setTestXmlReportPath(deviceManager.getTestBaseRelPathInUrl(new File(absoluteReportPath)));
} catch (Exception e) {
testRun.getLogger().error("Error in buildTestResultXml", e);
if (testRun.getTotalCount() > 0) {
try {
String absoluteReportPath = xmlBuilder.buildTestResultXml(testTask, testRun);
testRun.setTestXmlReportPath(deviceManager.getTestBaseRelPathInUrl(new File(absoluteReportPath)));
} catch (Exception e) {
testRun.getLogger().error("Error in buildTestResultXml", e);
}
}
if (testTaskRunCallback != null) {
try {
Expand Down

0 comments on commit 47a5b2a

Please sign in to comment.