Skip to content

JUnit Reporter

The JUnit reporter generates a report in the JUnit XML format. This report can be used with various CI/CD tools to integrate test results into your build pipeline. The JUnit report includes information about passed and failed tests, as well as any errors or warnings that occurred during the test run.

Usage

To use the JUnit reporter, simply run your tests with the --report-type=junit options set. For example:

Terminal window
latte --coverage --report-type=junit

Report Directory

This will generate a JUnit report in the coverage directory by default. You can specify a different output directory using the --report-dir option:

Terminal window
latte --coverage --report-type=junit --report-dir=reports

Report File

You can also specify a custom report file name using the --report-file option. For example:

Terminal window
latte --coverage --report-type=junit --report-file=report.xml

This will generate a JUnit report with the specified file name in the coverage directory. You can use this file to integrate test results into your CI/CD pipeline or share it with your team.