'How to generate html test report for junit in sbt?

I have junit tests in my scala sbt project.

I know, that I can generate html reports for ScalaTest with:

testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/test-reports")

But how to generate html for junit tests?



Solution 1:[1]

What I do is to generate an HTML report in code inside my build. I inspect every .xml file generated by JUnit, and convert the relevant data to an HTML table. It is quite simple to do so.

This is for my legacy tests. All new tests are written in ScalaTest.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 david.perez