Options for controlling unit tests execution.
Property | Description |
returnDefaultValues | Whether unmocked methods from android.jar should throw exceptions or return default values (i.e. zero or null). |
Method | Description |
all(configClosure) | Configures all unit testing tasks. |
Whether unmocked methods from android.jar should throw exceptions or return default values (i.e. zero or null).
See Test Your App for details.
Configures all unit testing tasks.
See Test
for available options.
Inside the closure you can check the name of the task to configure only some test tasks, e.g.
android { testOptions { unitTests.all { if (it.name == 'testDebug') { systemProperty 'debug', 'true' } } } }
Except as noted, this content is licensed under Apache 2.0.
For details and restrictions, see the Content License.