Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/main/java/hudson/plugins/robot/model/RobotCaseResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@
return duration;
if (elapsedtime != 0)
return Double.valueOf(elapsedtime * 1000).longValue(); // convert seconds to milliseconds
try{
return timeDifference(this.starttime, this.endtime);
} catch (ParseException e){
LOGGER.warn("Couldn't parse duration for test case " + name);
return 0;
if (StringUtils.isNotEmpty(this.endtime)) {

Check warning on line 121 in src/main/java/hudson/plugins/robot/model/RobotCaseResult.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 121 is only partially covered, one branch is missing
try {
return timeDifference(this.starttime, this.endtime);
} catch (ParseException e) {
LOGGER.warn("Couldn't parse duration for test case " + name);
}
}
return 0;

Check warning on line 128 in src/main/java/hudson/plugins/robot/model/RobotCaseResult.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 128 is not covered by tests
}

public String getStarttime() {
Expand Down