Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a nicely formatted JUnit report out of a Maven test run?

I have:

  • a pom.xml which includes junit 4.4, log4j 1.2, and maven-surefire-plugin
  • Some Scala tests with @RunWith(classOf[JUnitRunner]) and FunSpec

To run it, I do maven clean test etc.

I can generate Surefire HTML reports with a surefire-report Maven switch, but they're not very detailed and I don't think they conform to standard JUnit reports?

Any hints on how I can get a JUnit report output with a nice format (e.g. HTML + CSS)?

Thanks.

like image 897
Aaron Shaver Avatar asked Dec 03 '25 17:12

Aaron Shaver


1 Answers

The surefire-report:report and surefire-report:report-only goals will generate HTML report for Maven test execution. As part of Maven site generation it could be further styled using one of the skins

like image 128
Eugene Kuleshov Avatar answered Dec 07 '25 16:12

Eugene Kuleshov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!