# TestSuiteBuilder

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/TestSuiteBuilder.kt+class:com.android.build.api.variant.TestSuiteBuilder) Added in 9.4.1


```
interface TestSuiteBuilder : Named
```

<br />

*** ** * ** ***

Interface to configure `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuite` during the `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/AndroidComponentsExtension#beforeVariants(com.android.build.api.variant.VariantSelector,kotlin.Function1)` callbacks.

## Usage example

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

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteBuilder#enable()` Enables or disable the test suite for the current variant. |
| `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/JUnitEngineSpecBuilder` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteBuilder#junitEngineSpec()` Configure the `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/JUnitEngineSpec` for this test suite in this variant. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteTargetBuilder>` | `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteBuilder#targets()` Configure the list of `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteTargetBuilder` for this test suite in this variant. |

### Inherited functions

From [org.gradle.api.Named](https://docs.gradle.org/current/javadoc/org/gradle/api/Named.html) `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` `https://docs.gradle.org/current/javadoc/org/gradle/api/Named.html#getName--()`

## Public properties

### enable

Added in 9.4.1

```
var enable: Boolean
```

Enables or disable the test suite for the current variant.

### junitEngineSpec

Added in 9.4.1

```
val junitEngineSpec: JUnitEngineSpecBuilder
```

Configure the `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/dsl/JUnitEngineSpec` for this test suite in this variant.

### targets

Added in 9.4.1

```
val targets: Map<String, TestSuiteTargetBuilder>
```

Configure the list of `https://developer.android.com/reference/tools/gradle-api/9.4/com/android/build/api/variant/TestSuiteTargetBuilder` for this test suite in this variant.

The `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html` keys are the test suite names.