interface JavaForkOptions : ProcessForkOptions
Specifies the options to use to fork a Java process.
abstract fun bootstrapClasspath(vararg classpath: Any): JavaForkOptions
Adds the given values to the end of the bootstrap classpath for the process. |
|
abstract fun copyTo(options: JavaForkOptions): JavaForkOptions
Copies these options to the given options. |
|
abstract fun getAllJvmArgs(): MutableList<String>
Returns the full set of arguments to use to launch the JVM for the process. This includes arguments to define system properties, the minimum/maximum heap size, and the bootstrap classpath. |
|
abstract fun getBootstrapClasspath(): FileCollection
Returns the bootstrap classpath to use for the process. The default bootstrap classpath for the JVM is used when this classpath is empty. |
|
abstract fun getDebug(): Boolean
Determines whether debugging is enabled for the test process. When enabled — |
|
abstract fun getDefaultCharacterEncoding(): String
Returns the default character encoding to use. |
|
abstract fun getEnableAssertions(): Boolean
Returns true if assertions are enabled for the process. |
|
abstract fun getJvmArgs(): MutableList<String>
Returns the extra arguments to use to launch the JVM for the process. Does not include system properties and the minimum/maximum heap size. |
|
abstract fun getJvmArgumentProviders(): MutableList<CommandLineArgumentProvider>
Command line argument providers for the java process to fork. |
|
abstract fun getMaxHeapSize(): String
Returns the maximum heap size for the process, if any. |
|
abstract fun getMinHeapSize(): String
Returns the minimum heap size for the process, if any. |
|
abstract fun getSystemProperties(): MutableMap<String, Any>
Returns the system properties which will be used for the process. |
|
abstract fun jvmArgs(arguments: MutableIterable<*>): JavaForkOptions abstract fun jvmArgs(vararg arguments: Any): JavaForkOptions
Adds some arguments to use to launch the JVM for the process. |
|
abstract fun setAllJvmArgs(arguments: MutableList<String>): Unit abstract fun setAllJvmArgs(arguments: MutableIterable<*>): Unit
Sets the full set of arguments to use to launch the JVM for the process. Overwrites any previously set system properties, minimum/maximum heap size, assertions, and bootstrap classpath. |
|
abstract fun setBootstrapClasspath(classpath: FileCollection): Unit
Sets the bootstrap classpath to use for the process. Set to an empty classpath to use the default bootstrap classpath for the specified JVM. |
|
abstract fun setDebug(enabled: Boolean): Unit
Enable or disable debugging for the process. When enabled, the process is started suspended and listening on port 5005. |
|
abstract fun setDefaultCharacterEncoding(defaultCharacterEncoding: String): Unit
Sets the default character encoding to use. Note: Many JVM implementations support the setting of this attribute via system property on startup (namely, the |
|
abstract fun setEnableAssertions(enabled: Boolean): Unit
Enable or disable assertions for the process. |
|
abstract fun setJvmArgs(arguments: MutableList<String>): Unit abstract fun setJvmArgs(arguments: MutableIterable<*>): Unit
Sets the extra arguments to use to launch the JVM for the process. System properties and minimum/maximum heap size are updated. |
|
abstract fun setMaxHeapSize(heapSize: String): Unit
Sets the maximum heap size for the process. |
|
abstract fun setMinHeapSize(heapSize: String): Unit
Sets the minimum heap size for the process. |
|
abstract fun setSystemProperties(properties: MutableMap<String, *>): Unit
Sets the system properties to use for the process. |
|
abstract fun systemProperties(properties: MutableMap<String, *>): JavaForkOptions
Adds some system properties to use for the process. |
|
abstract fun systemProperty(name: String, value: Any): JavaForkOptions
Adds a system property to use for the process. |
abstract fun copyTo(options: ProcessForkOptions): ProcessForkOptions
Copies these options to the given target options. |
|
abstract fun environment(environmentVariables: MutableMap<String, *>): ProcessForkOptions
Adds some environment variables to the environment for this process. abstract fun environment(name: String, value: Any): ProcessForkOptions
Adds an environment variable to the environment for this process. |
|
abstract fun executable(executable: Any): ProcessForkOptions
Sets the name of the executable to use. |
|
abstract fun getEnvironment(): MutableMap<String, Any>
The environment variables to use for the process. Defaults to the environment of this process. |
|
abstract fun getExecutable(): String
Returns the name of the executable to use. |
|
abstract fun getWorkingDir(): File
Returns the working directory for the process. Defaults to the project directory. |
|
abstract fun setEnvironment(environmentVariables: MutableMap<String, *>): Unit
Sets the environment variable to use for the process. |
|
abstract fun setExecutable(executable: String): Unit abstract fun setExecutable(executable: Any): Unit
Sets the name of the executable to use. |
|
abstract fun setWorkingDir(dir: File): Unit
Sets the working directory for the process. abstract fun setWorkingDir(dir: Any): Unit
Sets the working directory for the process. The supplied argument is evaluated as per |
|
abstract fun workingDir(dir: Any): ProcessForkOptions
Sets the working directory for the process. The supplied argument is evaluated as per |
interface JavaExecSpec : JavaForkOptions, BaseExecSpec
Specifies the options for executing a Java application. |
|
open class Test : AbstractTestTask, JavaForkOptions, PatternFilterable
Executes JUnit (3.8.x, 4.x or 5.x) or TestNG tests. Test are always run in (one or more) separate JVMs. The sample below shows various configuration options.
The test process can be started in debug mode (see
|