Reputation: 131
Does anyone has an idea about how to pass command line arguments to Android instrumentation tests run using gradle. Calling gradle connectedInstrumentTest with -p arguments or -D arguments did n't seem to work .I am trying to pass command line arguments to my instrument test using gradle.
Upvotes: 8
Views: 2235
Reputation: 1096
It is possible since 1.3.0 version of plugin according to docs: http://tools.android.com/tech-docs/new-build-system
It's now possible to specify instrumentation test runner arguments in build.gradle (in defaultConfig or per flavor):
android { defaultConfig { testInstrumentationRunnerArguments size: "medium" } }
This can also be done on the command line:
./gradlew cC -Pandroid.testInstrumentationRunnerArguments.size=medium
Upvotes: 7
Reputation: 28549
you mean pass arguments to the am command? It's not possible at the moment.
Upvotes: 1