TestSuiteBuilder

Added in 9.5.0-alpha04

interface TestSuiteBuilder : Named


Interface to configure TestSuite during the AndroidComponentsExtension.beforeVariants callbacks.

Usage example

androidComponents.beforeVariants { variant ->
(variant as? HasTestSuites)?.suites.forEach { suiteBuilder ->
suiteBuilder.enable = false
}
}

Summary

Public functions

Unit

Specifies test suite code coverage data collection by configuring the JacocoPlugin.

Public properties

Boolean

Enables or disable the test suite for the current variant.

JUnitEngineSpecBuilder

Configure the com.android.build.api.dsl.JUnitEngineSpec for this test suite in this variant.

Map<StringTestSuiteTargetBuilder>

Configure the list of TestSuiteTargetBuilder for this test suite in this variant.

Inherited functions

From org.gradle.api.Named

Public functions

setEnabledCodeCoverage

Added in 9.5.0-alpha04
@Incubating
fun setEnabledCodeCoverage(value: Boolean): Unit

Specifies test suite code coverage data collection by configuring the JacocoPlugin.

When enabled, the Jacoco plugin is applied and coverage data is collected by the Jacoco plugin.

If the value is initialized from the DSL com.android.build.api.dsl.AgpTestSuite.codeCoverage, it will be used.

Public properties

enable

Added in 9.5.0-alpha04
var enableBoolean

Enables or disable the test suite for the current variant.

junitEngineSpec

Added in 9.5.0-alpha04
val junitEngineSpecJUnitEngineSpecBuilder

Configure the com.android.build.api.dsl.JUnitEngineSpec for this test suite in this variant.

targets

Added in 9.5.0-alpha04
val targetsMap<StringTestSuiteTargetBuilder>

Configure the list of TestSuiteTargetBuilder for this test suite in this variant.

The Map keys are the test suite names.