Browse Source

bz-64836 junitlauncher - Print the summary only if any test was present in the test plan

master
Jaikiran Pai 4 years ago
parent
commit
840cd27bae
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java

+ 4
- 0
src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java View File

@@ -612,6 +612,10 @@ public class LauncherSupport {
@Override
public void testPlanExecutionFinished(final TestPlan testPlan) {
super.testPlanExecutionFinished(testPlan);
if (!testPlan.containsTests()) {
// we print the summary only if any tests are present
return;
}
if (launchDefinition.isPrintSummary()) {
final TestExecutionSummary summary = this.getSummary();
// Keep the summary as close to as the old junit task summary


Loading…
Cancel
Save