try {
XMLReport report = new XMLReport();
String name = getTestName(test);
System.out.println("Running " + name);
TestResult tr = new TestResult();
tr.addListener(new ResultListener(report));
test.run(tr);
m_results.add(tr);
if (tr.wasSuccessful()) {
System.out.println("Tests run: "
+ tr.runCount()
+ ", Failures: "
+ tr.failureCount()
+ ", Errors: "
+ tr.errorCount()
+ ", Time elapsed: "
+ report.elapsedTimeAsString(report.m_endTime
- report.m_endTime) + " sec");
} else {
System.out.println("Tests run: "
+ tr.runCount()
+ ", Failures: "
+ tr.failureCount()
+ ", Errors: "
+ tr.errorCount()
+ ", Time elapsed: "
+ report.elapsedTimeAsString(report.m_endTime
- report.m_endTime) + " sec <<< FAILURE!");
if (tr.errorCount() > 0) {
m_errors.add(tr);
}
if (tr.failureCount() > 0) {
m_failures.add(tr);
}
}
m_total += tr.runCount();
m_totalFailures += tr.failureCount();
m_totalErrors += tr.errorCount();
report.generateReport(test, tr, m_reportsDirectory, bc, felixConf);
} catch (Exception e) {
getLog().error(e);