api / org.gradle.api.tasks.testing / Test / setTestClassesDirs

setTestClassesDirs

open fun setTestClassesDirs(testClassesDirs: FileCollection): Unit

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

 apply plugin: '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 } 

Parameters

testClassesDirs - All test class directories to be used.

Since
4.0