# getTestClassesDirs

@Internal
abstract fun getTestClassesDirs(): ConfigurableFileCollection(source)

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
    }

Content copied to clipboard

#### Return

All test class directories to be used.

#### Since

4.0