Add the ability to generate additional JUnit 5 test reports#432
Add the ability to generate additional JUnit 5 test reports#432amilbourne wants to merge 1 commit into
Conversation
|
My concern with this is with the output files generated. In the default case, when no report engine is specified, this generates a Otherwise I like this idea and can see it could be very useful. |
|
Sorry for my slow response. I did originally try writing some tests to check that the files were generated correctly but this was quite gnarly code as it involved calling a build from a test. I could put this back and you can see if you think it is OK. I will update this PR. |
This adds 2 extra parameters to the java_junit5_test target. They are 'report_generator' and 'report_generator_deps'. This allows the 2 standard JUnit5 reports (legacy & open) to be generated as well as user defined reports.
This PR stems from issue #410
This adds 2 extra parameters to the java_junit5_test target. They are 'report_generator' and 'report_generator_deps'. This allows the 2 standard JUnit5 reports (legacy & open) to be generated as well as user defined reports.
The additional tests demonstrate how to use the new parameters, which should generate additional reports, rather than changing the existing report (test.xml).
Because open test reporting was only added in JUnit 5.9, I upgraded the JUnit dependencies from 5.8 to 5.9. I think the target should still work fine with JUnit <5.9 as I haven't directly depended on the open reporting generator. The target will obviously fail if you specify open reporting when running against an earlier version of JUnit 5. I upgraded in order to test open reporting, but if the upgrade is a problem then I could remove the test and all would be fine without the upgrade. I could also split the upgrade into a separate commit or PR if that makes it better.