TestbootstrapClasspath(Object... classpath)Adds the given values to the end of the bootstrap classpath for the process.
TestcopyTo(JavaForkOptions target)Copies these options to the given options.
TestcopyTo(ProcessForkOptions target)Copies these options to the given target options.
protected org.gradle.api.internal.tasks.testing.TestExecuter<org.gradle.api.internal.tasks.testing.JvmTestExecutionSpec>createTestExecuter()Creates test executer.
protected org.gradle.api.internal.tasks.testing.JvmTestExecutionSpeccreateTestExecutionSpec()Creates test execution specification.
voiddebugOptions(Action<JavaDebugOptions> action)Configures Java Debug Wire Protocol properties for the process.
Testenvironment(String name,
Object value)Adds an environment variable to the environment for this process.
Testenvironment(Map<String,?> environmentVariables)Adds some environment variables to the environment for this process.
Testexclude(Closure excludeSpec)Adds an exclude spec.
Testexclude(Iterable<String> excludes)Adds exclude patterns for the files in the test classes directory (e.g.
Testexclude(String... excludes)Adds exclude patterns for the files in the test classes directory (e.g.
Testexclude(Spec<FileTreeElement> excludeSpec)Adds an exclude spec.
Testexecutable(Object executable)Sets the name of the executable to use.
voidexecuteTests()voidfilter(Action<TestFilter> action)protected org.gradle.internal.actor.ActorFactorygetActorFactory()List<String>getAllJvmArgs()Returns the full set of arguments to use to launch the JVM for the process.
FileCollectiongetBootstrapClasspath()Returns the bootstrap classpath to use for the process.
FileTreegetCandidateClassFiles()Returns the classes files to scan for test classes.
FileCollectiongetClasspath()Returns the classpath to use to execute the tests.
booleangetDebug()Determines whether debugging is enabled for the test process.
JavaDebugOptionsgetDebugOptions()Returns the Java Debug Wire Protocol properties for the process.
StringgetDefaultCharacterEncoding()Returns the default character encoding to use.
booleangetEnableAssertions()Returns true if assertions are enabled for the process.
Map<String,Object>getEnvironment()The environment variables to use for the process.
Set<String>getExcludes()Returns the exclude patterns for test execution.
StringgetExecutable()Returns the name of the executable to use.
booleangetFailFast()Indicates if this task will fail on the first failed test
longgetForkEvery()Returns the maximum number of test classes to execute in a forked test process.
protected org.gradle.process.internal.JavaForkOptionsFactorygetForkOptionsFactory()Set<String>getIncludes()Returns the include patterns for test execution.
Property<JavaLauncher>getJavaLauncher()Configures the java executable to be used to run the tests.
protected org.gradle.internal.jvm.JavaModuleDetectorgetJavaModuleDetector()JavaVersiongetJavaVersion()Returns the version of Java used to run the tests based on the executable specified by getExecutable().
List<String>getJvmArgs()Returns the extra arguments to use to launch the JVM for the process.
List<CommandLineArgumentProvider>getJvmArgumentProviders()Command line argument providers for the java process to fork.
StringgetMaxHeapSize()Returns the maximum heap size for the process, if any.
intgetMaxParallelForks()Returns the maximum number of test processes to start in parallel.
StringgetMinHeapSize()Returns the minimum heap size for the process, if any.
ModularitySpecgetModularity()Returns the module path handling of this test task.
protected org.gradle.api.internal.classpath.ModuleRegistrygetModuleRegistry()protected List<String>getNoMatchingTestErrorReasons()Returns the reasons for no matching test error.
protected ObjectFactorygetObjectFactory()TestFrameworkOptionsgetOptions()Returns test framework specific options.
protected org.gradle.internal.Factory<PatternSet>getPatternSetFactory()protected org.gradle.process.internal.worker.WorkerProcessFactorygetProcessBuilderFactory()protected FileCollectiongetStableClasspath()Returns the classpath to use to execute the tests.
Map<String,Object>getSystemProperties()Returns the system properties which will be used for the process.
FileCollectiongetTestClassesDirs()Returns the directories for the compiled test sources.
org.gradle.api.internal.tasks.testing.TestFrameworkgetTestFramework()FilegetWorkingDir()Returns the working directory for the process.
Testinclude(Closure includeSpec)Adds an include spec.
Testinclude(Iterable<String> includes)Adds include patterns for the files in the test classes directory (e.g.
Testinclude(String... includes)Adds include patterns for the files in the test classes directory (e.g.
Testinclude(Spec<FileTreeElement> includeSpec)Adds an include spec.
booleanisScanForTestClasses()Specifies whether test classes should be detected.
TestjvmArgs(Iterable<?> arguments)Adds some arguments to use to launch the JVM for the process.
TestjvmArgs(Object... arguments)Adds some arguments to use to launch the JVM for the process.
TestFrameworkOptionsoptions(Closure testFrameworkConfigure)Configures test framework specific options.
TestFrameworkOptionsoptions(Action<? super TestFrameworkOptions> testFrameworkConfigure)Configures test framework specific options.
voidsetAllJvmArgs(Iterable<?> arguments)Sets the full set of arguments to use to launch the JVM for the process.
voidsetAllJvmArgs(List<String> arguments)Sets the full set of arguments to use to launch the JVM for the process.
voidsetBootstrapClasspath(FileCollection classpath)Sets the bootstrap classpath to use for the process.
voidsetClasspath(FileCollection classpath)voidsetDebug(boolean enabled)Enable or disable debugging for the process.
voidsetDefaultCharacterEncoding(String defaultCharacterEncoding)Sets the default character encoding to use.
voidsetEnableAssertions(boolean enabled)Enable or disable assertions for the process.
voidsetEnvironment(Map<String,?> environmentVariables)Sets the environment variable to use for the process.
TestsetExcludes(Iterable<String> excludes)Sets the exclude patterns for test execution.
voidsetExecutable(Object executable)Sets the name of the executable to use.
voidsetExecutable(String executable)Sets the name of the executable to use.
voidsetFailFast(boolean failFast)Enables fail fast behavior causing the task to fail on the first failed test.
voidsetForkEvery(Long forkEvery)Sets the maximum number of test classes to execute in a forked test process.
TestsetIncludes(Iterable<String> includes)Sets the include patterns for test execution.
voidsetJvmArgs(Iterable<?> arguments)Sets the extra arguments to use to launch the JVM for the process.
voidsetJvmArgs(List<String> arguments)Sets the extra arguments to use to launch the JVM for the process.
voidsetMaxHeapSize(String heapSize)Sets the maximum heap size for the process.
voidsetMaxParallelForks(int maxParallelForks)Sets the maximum number of test processes to start in parallel.
voidsetMinHeapSize(String heapSize)Sets the minimum heap size for the process.
voidsetScanForTestClasses(boolean scanForTestClasses)voidsetSystemProperties(Map<String,?> properties)Sets the system properties to use for the process.
voidsetTestClassesDirs(FileCollection testClassesDirs)Sets the directories to scan for compiled test sources.
TestsetTestNameIncludePatterns(List<String> testNamePattern)Sets the test name patterns to be included in execution.
voidsetWorkingDir(File dir)Sets the working directory for the process.
voidsetWorkingDir(Object dir)Sets the working directory for the process.
TestsystemProperties(Map<String,?> properties)Adds some system properties to use for the process.
TestsystemProperty(String name,
Object value)Adds a system property to use for the process.
org.gradle.api.internal.tasks.testing.TestFrameworktestFramework(Closure testFrameworkConfigure)voiduseJUnit()Specifies that JUnit should be used to execute the tests.
voiduseJUnit(Closure testFrameworkConfigure)Specifies that JUnit should be used to execute the tests, configuring JUnit specific options.
voiduseJUnit(Action<? super JUnitOptions> testFrameworkConfigure)Specifies that JUnit should be used to execute the tests, configuring JUnit specific options.
voiduseJUnitPlatform()Specifies that JUnit Platform (a.k.a.
voiduseJUnitPlatform(Action<? super JUnitPlatformOptions> testFrameworkConfigure)Specifies that JUnit Platform (a.k.a.
voiduseTestNG()Specifies that TestNG should be used to execute the tests.
voiduseTestNG(Closure testFrameworkConfigure)Specifies that TestNG should be used to execute the tests, configuring TestNG specific options.
voiduseTestNG(Action<? super TestNGOptions> testFrameworkConfigure)Specifies that TestNG should be used to execute the tests, configuring TestNG specific options.
TestworkingDir(Object dir)Sets the working directory for the process.