Maven
Maven is a testing framework for Java.
Enabling XML Output
When a Maven project is tested with mvn test
it does not automatically produce JUnit XML output. You can enable XML output with the Surefire plugin. To enable it, add the following to the plugins
section of your pom.xml
file.
and then run
The output will be in the target/surefire-reports
directory.
Test Suite Naming
You can change the output filename with the <reportsDirectory>
property.
You can see a full list of configuration options here.
Further Information
See an example of running Maven inside of a GitHub action here.
Last updated