gradle
8.5

# withTaskAndTestClasses

abstract fun withTaskAndTestClasses(task: String, testClasses: Iterable<String>): TestLauncher(source)

Adds tests to be executed declared by the container task and the class name.

Note: These tests are ignored for target Gradle version earlier than 6.1

#### Return

this

#### Parameters

task

The path of the target task.

testClasses

The class names of the tests to be executed.