mercredi 23 septembre 2015

How can I run a junit test suite using maven and receive summary output similar to individual tests?

When running individual junit test classes using maven's surefire plugin, I get output similar to the following where the test results are displayed for each individual test class:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running my.package.MyTestClass1
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.50 sec - in my.package.MyTestClass1
Running my.package.MyTestClass2
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.25 sec - in my.package.MyTestClass2
Running my.package.MyTestClass3
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.74 sec - in my.package.MyTestClass3
...
Results :

Tests run: 133, Failures: 0, Errors: 0, Skipped: 1

However, if I run the same classes via a test suite class, I get output similar to the following where the test results are aggregated for the entire suite:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running my.package.AllTests
Tests run: 133, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 32.44 sec - in my.package.AllTests

Results :

Tests run: 133, Failures: 0, Errors: 0, Skipped: 1

How can I run the classes via a test suite class, but yet still see the test result information for each individual test class defined in the suite?

Aucun commentaire:

Enregistrer un commentaire