Test Launcher
A TestLauncher
allows you to execute tests in a Gradle build.
If the target Gradle version is >=6.8 then you can use TestLauncher
to execute tests from included builds. Test operation descriptors from included builds work out-of-the-box. You can target tasks from included builds by specifying the task identity path (i.e. ':included-build-name:subproject-name:taskName'
).
However, you cannot use the methods with included builds that don't specify the target test tasks (e.g. withJvmTestClasses()
and withJvmTestMethods()
). Those methods configure all test tasks in the root build only.
Since
2.6
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Configures test JVM to run in debug mode.
Link copied to clipboard
Sets the tasks to be executed.
Link copied to clipboard
Executes the tests, blocking until complete.
Starts executing the tests.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Adds tests to be executed declared by class name.
Link copied to clipboard
Adds tests to be executed declared by class and methods name.
Adds tests to be executed declared by class and method name.
Link copied to clipboard
Link copied to clipboard
Adds tests to be executed declared by the container task and the class name.
Link copied to clipboard
abstract fun withTaskAndTestMethods(task: String, testClass: String, methods: Iterable<String>): TestLauncher
Adds tests to be executed declared by the container task, class and method name.
Link copied to clipboard
Adds tests to be executed by passing test descriptors received from a previous Gradle Run.
Link copied to clipboard
Adds tests to be executed declared using a fine-grained test selection API.