A TestLauncher
allows you to execute tests in a Gradle build.
Type | Name and description |
---|---|
void |
run() Executes the build, blocking until it is complete. |
void |
run(ResultHandler<? super Void> handler) Launches the build. |
TestLauncher |
withJvmTestClasses(String... testClasses) Adds tests to be executed declared by class name. |
TestLauncher |
withJvmTestClasses(Iterable<String> testClasses) Adds tests to be executed declared by class name. |
TestLauncher |
withTests(TestOperationDescriptor... descriptors) Adds tests to be executed by passing test descriptors received from a previously Gradle Run. |
TestLauncher |
withTests(Iterable<? extends TestOperationDescriptor> descriptors) Adds tests to be executed by passing test descriptors received from a previously Gradle Run. |
Methods inherited from class | Name |
---|---|
interface ConfigurableLauncher |
addProgressListener, addProgressListener, addProgressListener, addProgressListener, setColorOutput, setJavaHome, setJvmArguments, setJvmArguments, setStandardError, setStandardInput, setStandardOutput, withArguments, withArguments, withCancellationToken |
interface LongRunningOperation |
addProgressListener, addProgressListener, addProgressListener, addProgressListener, setColorOutput, setJavaHome, setJvmArguments, setJvmArguments, setStandardError, setStandardInput, setStandardOutput, withArguments, withArguments, withCancellationToken |
Executes the build, blocking until it is complete.
Launches the build. This method returns immediately, and the result is later passed to the given handler.
If the operation fails, the handler's ResultHandler.onFailure method is called with the appropriate exception. See run() for a description of the various exceptions that the operation may fail with.
handler
- The handler to supply the result to.Adds tests to be executed declared by class name.
testClasses
- The class names of the tests to be executed.Adds tests to be executed declared by class name.
testClasses
- The class names of the tests to be executed.Adds tests to be executed by passing test descriptors received from a previously Gradle Run.
descriptors
- The OperationDescriptor defining one or more tests.Adds tests to be executed by passing test descriptors received from a previously Gradle Run.
descriptors
- The OperationDescriptor defining one or more tests.