I am currently running a suite of tests using
adb shell am instrument -w ${PKGNAME}.test/android.support.test.runner.AndroidJUnitRunner
from a bash script. Also, when debugging and writing these tests, I also run them from Android Studio, so I lose the cmd line ability.
What I would like to do is to have a system property or a buildConfig variable that I can set only in my tests, to true, and to be able to use it in my android code.
I can't seem to find a gradle task/config that will set this for this type of test. The only thing I found that was close was testOptions, but this appears to only be for Unit Tests.