Skip to content
Snippets Groups Projects
Commit 98f20ebe authored by david_williams's avatar david_williams
Browse files

summarize times

parent 540b893a
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,6 @@ public class ResultsSummaryGenerator extends Task {
private int failures = -99;
private int totalTests = -99;
private float time = -99;
private float totalTime = -99;
int getErrors() {
return errors;
......@@ -169,13 +168,6 @@ public class ResultsSummaryGenerator extends Task {
this.time = time;
}
public float getTotalTime() {
return totalTime;
}
public void setTotalTime(float totalTime) {
this.totalTime = totalTime;
}
}
public static void main(String[] args) {
......@@ -692,7 +684,7 @@ public class ResultsSummaryGenerator extends Task {
testResultsWithProblems = testResultsWithProblems.concat(EOL + testName);
}
String tmp = formatTestRow(xmlFileNames[i].getPath(), errorCount, unitTestResults.getTotalTests(), unitTestResults.getTotalTime());
String tmp = formatTestRow(xmlFileNames[i].getPath(), errorCount, unitTestResults.getTotalTests(), unitTestResults.getTime());
replaceString = replaceString + tmp;
if (errorCount > 0) {
......@@ -957,9 +949,9 @@ public class ResultsSummaryGenerator extends Task {
aString = aString + "<td CLASS=\"" + "numeric" + "\">" + String.valueOf(errorCount) + "</td>" + EOL;
aString = aString + "<td CLASS=\"" + "numeric" + "\">" + String.valueOf(totalTests) + "</td>" + EOL;
}
if (totalTimes > 0) {
aString = aString + "<td CLASS=\"" + "numeric" + "\">" + String.valueOf(totalTimes) + "</td>" + EOL;
}
aString = aString + "<td CLASS=\"" + "numeric" + "\">" + String.valueOf(totalTimes) + "</td>" + EOL;
aString = aString + "</tr>" + EOL;
}
......@@ -992,7 +984,6 @@ public class ResultsSummaryGenerator extends Task {
int failureCount = 0;
int totalTests = 0;
float time = 0;
float totalTime = 0;
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
parser = docBuilderFactory.newDocumentBuilder();
......@@ -1016,14 +1007,12 @@ public class ResultsSummaryGenerator extends Task {
aNode = attributes.getNamedItem("time");
time = Float.parseFloat(aNode.getNodeValue());
totalTime = totalTime + time;
}
result.setErrors(errorCount);
result.setFailures(failureCount);
result.setTotalTests(totalTests);
result.setTime(time);
result.setTotalTime(totalTime);
}
catch (IOException e) {
System.out.println("IOException: " + fileName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment