For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

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

Since

6.1

Parameters

task

The path of the target task.

testClasses

The class names of the tests to be executed.