Class TestReport

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.tasks.testing.TestReport
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>

@DisableCachingByDefault(because="Not made cacheable, yet") public abstract class TestReport extends DefaultTask
Generates an HTML test report from the results of one or more Test tasks.
  • Constructor Details

    • TestReport

      public TestReport()
  • Method Details

    • getBuildOperationRunner

      @Inject protected org.gradle.internal.operations.BuildOperationRunner getBuildOperationRunner()
    • getBuildOperationExecutor

      @Inject protected org.gradle.internal.operations.BuildOperationExecutor getBuildOperationExecutor()
    • getObjectFactory

      @Inject protected ObjectFactory getObjectFactory()
    • getDestinationDir

      @ReplacedBy("destinationDirectory") @Deprecated public File getDestinationDir()
      Deprecated.
      Returns the directory to write the HTML report to. This method is @Deprecated, please use getDestinationDirectory() instead.
    • setDestinationDir

      @Deprecated public void setDestinationDir(File destinationDir)
      Deprecated.
      Sets the directory to write the HTML report to. This method is @Deprecated, please use getTestResults() instead to access the new collection property.
    • getDestinationDirectory

      @OutputDirectory public DirectoryProperty getDestinationDirectory()
      Returns the directory to write the HTML report to.
      Since:
      7.4
    • getTestResults

      Returns the set of binary test results to include in the report.
      Since:
      7.4
    • reportOn

      @Deprecated public void reportOn(Object... results)
      Deprecated.
      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(Object...). 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.
      This method is @Deprecated - use getTestResults() and invoke ConfigurableFileCollection.from(Object...) instead, passing references to AbstractTestTask.getBinaryResultsDirectory() as arguments.
      Parameters:
      results - The result objects.