api / org.gradle.api.tasks.testing.logging / TestLogging / setMaxGranularity

setMaxGranularity

abstract fun setMaxGranularity(granularity: Int): Unit

Returns the maximum granularity of the events to be logged. Typically, 0 corresponds to the Gradle-generated test suite for the whole test run, 1 corresponds to the Gradle-generated test suite for a particular test JVM, 2 corresponds to a test class, and 3 corresponds to a test method. These values will vary if user-defined suites are executed.

-1 denotes the highest granularity and corresponds to an atomic test.

Parameters

granularity - the maximum granularity of the events to be logged