getTestClassesDirs

The directories to scan for compiled test sources. Typically, this would be configured to use the output of a source set:

plugins {
    id 'java'
}

sourceSets {
   integrationTest {
      compileClasspath += main.output
      runtimeClasspath += main.output
   }
}

task integrationTest(type: Test) {
    // Runs tests from src/integrationTest
    testClassesDirs = sourceSets.integrationTest.output.classesDirs
    classpath = sourceSets.integrationTest.runtimeClasspath
}

Return

All test class directories to be used.

Since

4.0