Skip to content

Commit 06e67d1

Browse files
committed
Update README.md
Updated custom runner args doc with new android.testInstrumentationRunnerArguments.x namespace
1 parent 25ada86 commit 06e67d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

AndroidTestingBlueprint/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Since Gradle Android Plugin version 1.2.0 using ProGuard has become a lot easier
181181
To try it out just uncomment the minify section for the debug build type in the app modules `build.gradle` file.
182182

183183
## Custom Gradle command-line arguments
184-
Gradle allows you to pass custom arguments to `AndroidJUnitRunner`. This is equivalent to running `adb shell am instrument -w -e <argName> <argValue>`.
184+
Gradle allows you to pass custom arguments to `AndroidJUnitRunner`. This is equivalent to running `adb shell am instrument -w -e <argName> <argValue> com.example.android.testing.blueprint.test/android.support.test.runner.AndroidJUnitRunner`.
185185
Custom arguments can be particularly useful when you just want to run a specific test class/method/qualifier.
186186

187187
To pass a custom argument the -Pcom.android.tools.instrumentationTestRunnerArgs=argName=argValue
@@ -190,19 +190,19 @@ property needs to be used, in conjunction with `argName` and `argValue`. Multipl
190190
For instance, to run all tests annotated with the `@Large` test size qualifier in the app module, execute:
191191

192192
``` sh
193-
`./gradlew app:connectedCheck -Pcom.android.tools.instrumentationTestRunnerArgs=size=large`
193+
./gradlew app:connectedCheck -Pandroid.testInstrumentationRunnerArguments.size=large
194194
```
195195

196196
To only run tests for a specific test class, i.e. EspressoTest, execute:
197197

198198
``` sh
199-
`./gradlew app:connectedCheck -Pcom.android.tools.instrumentationTestRunnerArgs=class=com.example.android.testing.blueprint.ui.espresso.EspressoTest`
199+
./gradlew app:connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.testing.blueprint.ui.espresso.EspressoTest
200200
```
201201

202202
To pass in an arbitrary argument which can be accessed in a test at runtime, execute:
203203

204204
``` sh
205-
`./gradlew module-flavor1-androidTest-only:connectedCheck -Pcom.android.tools.instrumentationTestRunnerArgs=argument1=make_test_fail`
205+
`./gradlew module-flavor1-androidTest-only:connectedCheck -Pandroid.testInstrumentationRunnerArguments.argument1=make_test_fail`
206206
```
207207
All arguments passed through command line can also be specified in the project's build.gradle file, which is
208208
great for specifying values which are required by the test harness itself. The `argument1` from the previous

0 commit comments

Comments
 (0)