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.

beforeTest

open fun beforeTest(closure: Closure)(source)

Deprecated

Replace with addTestListener and a TestListener.

Adds a closure to be notified before a test is executed. A TestDescriptor instance is passed to the closure as a parameter.

Since

4.4

Parameters

closure

The closure to call.