I'm using Robolectric alongside Android Studio (v 1.2.2)
classpath 'com.android.tools.build:gradle:1.2.3'
buildToolsVersion "21.1.2"
testCompile 'org.robolectric:robolectric:3.0-rc3'
My project contains 4 build types. In spite of having debug
build type selected in the "Build Variants" window, Robolectric tests every declared build type (4 times).
Is it an expected behavior? How can I narrow down execution to just debug
build type?
Thanks.
It is quite simple. Let assume you have next:
So to run tests for on flavour you simply run gradle:
To run all tests for all variants: