Package org.gradle.api.tasks.testing

# Interface JUnitXmlReport

All Superinterfaces:
  `Configurable<Report>`, `ConfigurableReport`, `DirectoryReport`, `Report`

public interface JUnitXmlReport extends DirectoryReport
The JUnit XML files, commonly used to communicate results to CI servers.

See Also:
  - `TestTaskReports.getJunitXml()`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.gradle.api.reporting.Report

  `Report.OutputType`

- ## Field Summary

  ### Fields inherited from interface org.gradle.api.reporting.Report

  `NAMER`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Property<Boolean>`
  `getIncludeSystemErrLog()`
  Decide to include or omit the system err log in the XML report.
  `Property<Boolean>`
  `getIncludeSystemOutLog()`
  Decide to include or omit the system out log in the XML report.
  `Property<Boolean>`
  `getMergeReruns()`
  Whether reruns or retries of a test should be merged into a combined testcase.
  `boolean`
  `isOutputPerTestCase()`
  Should the output be associated with individual test cases instead of at the suite level.
  `void`
  `setOutputPerTestCase(boolean outputPerTestCase)`
  Should the output be associated with individual test cases instead of at the suite level.

  ### Methods inherited from interface org.gradle.util.Configurable

  `configure`

  ### Methods inherited from interface org.gradle.api.reporting.ConfigurableReport

  `setDestination`

  ### Methods inherited from interface org.gradle.api.reporting.DirectoryReport

  `getEntryPoint, getOutputLocation, getOutputType`

  ### Methods inherited from interface org.gradle.api.reporting.Report

  `getDisplayName, getName, getRequired`

- ## Method Details

  - ### isOutputPerTestCase

    @Input boolean isOutputPerTestCase()
    Should the output be associated with individual test cases instead of at the suite level.

  - ### setOutputPerTestCase

    void setOutputPerTestCase(boolean outputPerTestCase)
    Should the output be associated with individual test cases instead of at the suite level.

  - ### getMergeReruns

    @Input Property<Boolean> getMergeReruns()
    Whether reruns or retries of a test should be merged into a combined testcase. When enabled, the XML output will be very similar to the surefire plugin of Apache Maven™ when enabling reruns. If a test fails but is then retried and succeeds, its failures will be recorded as `<flakyFailure>` instead of `<failure>`, within one `<testcase>`. This can be important for build tooling that uses this XML to understand test results, and where distinguishing such passed-on-retry outcomes is important. This is the case for the Jenkins CI server and its Flaky Test Handler plugin. This value defaults to `false`, causing each test execution to be a discrete `<testcase>`.
    Since:
      6.8
    See Also:
      - https://maven.apache.org/components/surefire/maven-surefire-plugin/examples/rerun-failing-tests.html
      - https://plugins.jenkins.io/flaky-test-handler

  - ### getIncludeSystemOutLog

    @Input @Incubating Property<Boolean> getIncludeSystemOutLog()
    Decide to include or omit the system out log in the XML report. The default behavior is to have it.
    Since:
      8.8

  - ### getIncludeSystemErrLog

    @Input @Incubating Property<Boolean> getIncludeSystemErrLog()
    Decide to include or omit the system err log in the XML report. The default behavior is to have it.
    Since:
      8.8