Integrating with a Build System

Jtest ships with support for Maven, Ant, and Gradle. Integrating your build system with Jtest allows you to collect and report unit test results and coverage data. See the following sections for details about integration, usage, and supported versions:

Optimizing Performance and Improving Consistency

By default, Jtest calculates test results and coverage data by processing XML files generated by build systems. This workflow involves code instrumentation, which adds an overhead to the performance. In addition, XML files may vary between different versions of a build system, which may affect the consistency of test results after a build system upgrade.

You can optimize performance and improve the consistency of results by disabling the XML processing mechanism. To do this, configure the following option in the jtestcli.properties configuration file:

jtest.unittest.xml.results.processing.enabled=false

Disabling this option may affect collecting results for test suites and JUnit 3 tests; see the sections below.

Executing Test Suites

When the XML processing mechanism is disabled, Jtest can collect results for test suites, including nested test suites. The test suite hierarchy is displayed in the report if you are using JUnit 4.13 or higher. For earlier JUnit versions, the test suite hierarchy is not presented in the report.

Executing JUnit 3 Tests

To collect test results for JUnit 3 tests when the XML processing mechanism is disabled, you must configure your project to execute JUnit 3 tests using JUnit 4 or JUnit 5.

  • No labels