JUnit Format

Description

JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit XML result files are imported as test artefacts and links to tested classes are generated in the project.

For more details, refer to http://junit.org/.

Note

The JUnit Data Provider no longer produces findings. Instead, it creates test artefacts (new in 18.0) with a Pass/Fail status so you can filter the artefacts in the Explorer or create action items based on a test's status.

Usage

JUnit Format has the following options:

  • Results folder ( resultDir , mandatory) Specify the path to the folder containing the JUnit results (or by a tool able to produce data in this format). The data provider will parse subfolders recursively. Note that the minimum support version of JUnit is 4.10.​

  • File Pattern ( filePattern , mandatory, default: TEST-*.xml) Specify the pattern for files to read reports from.​

  • Root Artefact ( root , mandatory, default: tests[type=TEST_FOLDER]/junit[type=TEST_FOLDER]) Specify the name and type of the artefact under which the test artefacts will be created.​

The full command line syntax for JUnit Format is:

-d "type=JUnit,resultDir=[text],filePattern=[text],root=[text]"