docs.gradle.org

All Methods Instance Methods Concrete Methods  Modifier and Type Method Description Test bootstrapClasspath​(Object... classpath)

Adds the given values to the end of the bootstrap classpath for the process.

Test copyTo​(JavaForkOptions target)

Copies these options to the given options.

Test copyTo​(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.JvmTestExecutionSpec createTestExecutionSpec()

Creates test execution specification.

void debugOptions​(Action<JavaDebugOptions> action)

Configures Java Debug Wire Protocol properties for the process.

Test environment​(String name, Object value)

Adds an environment variable to the environment for this process.

Test environment​(Map<String,​?> environmentVariables)

Adds some environment variables to the environment for this process.

Test exclude​(Closure excludeSpec)

Adds an exclude spec.

Test exclude​(Iterable<String> excludes)

Adds exclude patterns for the files in the test classes directory (e.g.

Test exclude​(String... excludes)

Adds exclude patterns for the files in the test classes directory (e.g.

Test exclude​(Spec<FileTreeElement> excludeSpec)

Adds an exclude spec.

Test executable​(Object executable)

Sets the name of the executable to use.

void executeTests()   void filter​(Action<TestFilter> action) protected org.gradle.internal.actor.ActorFactory getActorFactory()   List<String> getAllJvmArgs()

Returns the full set of arguments to use to launch the JVM for the process.

FileCollection getBootstrapClasspath()

Returns the bootstrap classpath to use for the process.

FileTree getCandidateClassFiles()

Returns the classes files to scan for test classes.

FileCollection getClasspath()

Returns the classpath to use to execute the tests.

boolean getDebug()

Determines whether debugging is enabled for the test process.

JavaDebugOptions getDebugOptions()

Returns the Java Debug Wire Protocol properties for the process.

String getDefaultCharacterEncoding()

Returns the default character encoding to use.

boolean getEnableAssertions()

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.

String getExecutable()

Returns the name of the executable to use.

boolean getFailFast()

Indicates if this task will fail on the first failed test

long getForkEvery()

Returns the maximum number of test classes to execute in a forked test process.

protected org.gradle.process.internal.JavaForkOptionsFactory getForkOptionsFactory()   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.JavaModuleDetector getJavaModuleDetector()   JavaVersion getJavaVersion()

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.

String getMaxHeapSize()

Returns the maximum heap size for the process, if any.

int getMaxParallelForks()

Returns the maximum number of test processes to start in parallel.

String getMinHeapSize()

Returns the minimum heap size for the process, if any.

ModularitySpec getModularity()

Returns the module path handling of this test task.

protected org.gradle.api.internal.classpath.ModuleRegistry getModuleRegistry()   protected List<String> getNoMatchingTestErrorReasons()

Returns the reasons for no matching test error.

protected ObjectFactory getObjectFactory()   TestFrameworkOptions getOptions()

Returns test framework specific options.

protected org.gradle.internal.Factory<PatternSet> getPatternSetFactory()   protected org.gradle.process.internal.worker.WorkerProcessFactory getProcessBuilderFactory()   protected FileCollection getStableClasspath()

Returns the classpath to use to execute the tests.

Map<String,​Object> getSystemProperties()

Returns the system properties which will be used for the process.

FileCollection getTestClassesDirs()

Returns the directories for the compiled test sources.

org.gradle.api.internal.tasks.testing.TestFramework getTestFramework()   File getWorkingDir()

Returns the working directory for the process.

Test include​(Closure includeSpec)

Adds an include spec.

Test include​(Iterable<String> includes)

Adds include patterns for the files in the test classes directory (e.g.

Test include​(String... includes)

Adds include patterns for the files in the test classes directory (e.g.

Test include​(Spec<FileTreeElement> includeSpec)

Adds an include spec.

boolean isScanForTestClasses()

Specifies whether test classes should be detected.

Test jvmArgs​(Iterable<?> arguments)

Adds some arguments to use to launch the JVM for the process.

Test jvmArgs​(Object... arguments)

Adds some arguments to use to launch the JVM for the process.

TestFrameworkOptions options​(Closure testFrameworkConfigure)

Configures test framework specific options.

TestFrameworkOptions options​(Action<? super TestFrameworkOptions> testFrameworkConfigure)

Configures test framework specific options.

void setAllJvmArgs​(Iterable<?> arguments)

Sets the full set of arguments to use to launch the JVM for the process.

void setAllJvmArgs​(List<String> arguments)

Sets the full set of arguments to use to launch the JVM for the process.

void setBootstrapClasspath​(FileCollection classpath)

Sets the bootstrap classpath to use for the process.

void setClasspath​(FileCollection classpath)   void setDebug​(boolean enabled)

Enable or disable debugging for the process.

void setDefaultCharacterEncoding​(String defaultCharacterEncoding)

Sets the default character encoding to use.

void setEnableAssertions​(boolean enabled)

Enable or disable assertions for the process.

void setEnvironment​(Map<String,​?> environmentVariables)

Sets the environment variable to use for the process.

Test setExcludes​(Iterable<String> excludes)

Sets the exclude patterns for test execution.

void setExecutable​(Object executable)

Sets the name of the executable to use.

void setExecutable​(String executable)

Sets the name of the executable to use.

void setFailFast​(boolean failFast)

Enables fail fast behavior causing the task to fail on the first failed test.

void setForkEvery​(Long forkEvery)

Sets the maximum number of test classes to execute in a forked test process.

Test setIncludes​(Iterable<String> includes)

Sets the include patterns for test execution.

void setJvmArgs​(Iterable<?> arguments)

Sets the extra arguments to use to launch the JVM for the process.

void setJvmArgs​(List<String> arguments)

Sets the extra arguments to use to launch the JVM for the process.

void setMaxHeapSize​(String heapSize)

Sets the maximum heap size for the process.

void setMaxParallelForks​(int maxParallelForks)

Sets the maximum number of test processes to start in parallel.

void setMinHeapSize​(String heapSize)

Sets the minimum heap size for the process.

void setScanForTestClasses​(boolean scanForTestClasses)   void setSystemProperties​(Map<String,​?> properties)

Sets the system properties to use for the process.

void setTestClassesDirs​(FileCollection testClassesDirs)

Sets the directories to scan for compiled test sources.

Test setTestNameIncludePatterns​(List<String> testNamePattern)

Sets the test name patterns to be included in execution.

void setWorkingDir​(File dir)

Sets the working directory for the process.

void setWorkingDir​(Object dir)

Sets the working directory for the process.

Test systemProperties​(Map<String,​?> properties)

Adds some system properties to use for the process.

Test systemProperty​(String name, Object value)

Adds a system property to use for the process.

org.gradle.api.internal.tasks.testing.TestFramework testFramework​(Closure testFrameworkConfigure)   void useJUnit()

Specifies that JUnit should be used to execute the tests.

void useJUnit​(Closure testFrameworkConfigure)

Specifies that JUnit should be used to execute the tests, configuring JUnit specific options.

void useJUnit​(Action<? super JUnitOptions> testFrameworkConfigure)

Specifies that JUnit should be used to execute the tests, configuring JUnit specific options.

void useJUnitPlatform()

Specifies that JUnit Platform (a.k.a.

void useJUnitPlatform​(Action<? super JUnitPlatformOptions> testFrameworkConfigure)

Specifies that JUnit Platform (a.k.a.

void useTestNG()

Specifies that TestNG should be used to execute the tests.

void useTestNG​(Closure testFrameworkConfigure)

Specifies that TestNG should be used to execute the tests, configuring TestNG specific options.

void useTestNG​(Action<? super TestNGOptions> testFrameworkConfigure)

Specifies that TestNG should be used to execute the tests, configuring TestNG specific options.

Test workingDir​(Object dir)

Sets the working directory for the process.

Read the original on docs.gradle.org ↗