TestOptions

Options for running tests.

Properties

PropertyDescription
animationsDisabled

Disables animations during instrumented tests.

execution

Specifies whether to use on-device test orchestration.

reportDir

Name of the reports directory.

resultsDir

Name of the results directory.

unitTests

Configures unit test options.

Methods

No methods

Script blocks

BlockDescription
unitTests

Configures unit test options.

Property details

boolean animationsDisabled

Disables animations during instrumented tests.

String execution

Specifies whether to use on-device test orchestration.

If you want to use Android Test Orchestrator, you need to specify "ANDROID_TEST_ORCHESTRATOR", as shown below. By default, this property is set to "HOST", which disables on-device orchestration.

android {
  testOptions {
    execution 'ANDROID_TEST_ORCHESTRATOR'
  }
}

String reportDir

Name of the reports directory.

String resultsDir

Name of the results directory.

UnitTestOptions unitTests

Configures unit test options.

Script block details

unitTests { }

Configures unit test options.

Delegates to:
UnitTestOptions from unitTests