Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks.testing
[Java] Class TestReport

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.api.tasks.testing.TestReport

    @Incubating
    public class TestReport
    extends DefaultTask

Generates an HTML test report from the results of one or more Test tasks.

Method Summary
`File` | `getDestinationDir()` Returns the directory to write the HTML report to.
`FileCollection` | `getTestResultDirs()` Returns the set of binary test results to include in the report.
`void` | `reportOn(Object... results)` Adds some results to include in the report.
`void` | `setDestinationDir(File destinationDir)` Sets the directory to write the HTML report to.
`void` | `setTestResultDirs(Iterable testResultDirs)` Sets the binary test results to use to include in the report.

Method Detail

### getDestinationDir

    @OutputDirectory
    public File getDestinationDir()

  Returns the directory to write the HTML report to.

### getTestResultDirs

    @InputFiles
    @SkipWhenEmpty
    public FileCollection getTestResultDirs()

  Returns the set of binary test results to include in the report.

### reportOn

    public void reportOn(Object... results)

  Adds some results to include in the report.

  This method accepts any parameter of the given types:

  - A Test task instance. The results from the test task are included in the report. The test task is automatically added as a dependency of this task.
  - Anything that can be converted to a set of File instances as per Project.files. These must point to the binary test results directory generated by a Test task instance.
  - An Iterable. The contents of the iterable are converted recursively.
  Parameters:
    `results` - The result objects.

### setDestinationDir

    public void setDestinationDir(File destinationDir)

  Sets the directory to write the HTML report to.

### setTestResultDirs

    public void setTestResultDirs(Iterable testResultDirs)

  Sets the binary test results to use to include in the report. Each entry must point to a binary test results directory generated by a Test task.

Gradle API 1.10