If your test suite produces JUnit-compatible XML reports, you can enable our
JUnit parser by annotating your test command with the
java: java_version: java-7-openjdk maven_version: '3.3.3' # See our Java documentation for versions tests: - type: junit command: mvn test report_files: - "target/surefire-reports/*.xml"
Going into detail on the configuration file:
javasection sets Java and Maven versions
testssection will run a single command (
mvn test) and look for Junit XML reports using the
target/surefire-reports/*.xmlglob pattern. If your JUnit reporter writes files into a different path, you can specify your own pattern, or a list of patterns.
Also it is possible to customize test command name using
tests: - name: JUnit test example command: mvn verify report_files: - "target/surefire-reports/*.xml"
You can see a sample application that’s configured to run
mvn test and collect JUnit results here:
Solano’s JUnit parser works with most JUnit-compatible test reporting tools. We test against:
- Maven (Surefire)