Documentation on android test coverage using uiautomator2-driver
MODIFY
docs/en/writing-running-appium/caps.md
docs/en/writing-running-appium/caps.md
|`appWaitDuration`| Timeout in milliseconds used to wait for the appWaitActivity to launch (default `20000`)| `30000`|
|`deviceReadyTimeout`| Timeout in seconds while waiting for device to become ready|`5`|
|`androidCoverage`| Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w | `com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation`|
+|`androidCoverageEndIntent`| A broadcast action implemented by yourself which is used to dump coverage into file system. Passed to -a in adb shell am broadcast -a | `com.example.pkg.END_EMMA`|
|`androidDeviceReadyTimeout`|Timeout in seconds used to wait for a device to become ready after booting|e.g., `30`|
|`androidInstallTimeout`|Timeout in milliseconds used to wait for an apk to install to the device. Defaults to `90000` |e.g., `90000`|
|`androidInstallPath`| The name of the directory on the device in which the apk will be push before install. Defaults to `/data/local/tmp` |e.g. `/sdcard/Downloads/`|

MODIFY
docs/en/writing-running-appium/default-capabilities-arg.md
docs/en/writing-running-appium/default-capabilities-arg.md
@@ -14,7 +14,7 @@ Appium 1.5 does away with most CLI flags that existed previously; the remainder
| Flag | JSON key |
-|---------------------------|-------------------------|
+|---------------------------------|-------------------------------|
| --keep-artifacts | keepArtifacts |
| --platform-name | platformName |
| --platform-version | platformVersion |
@@ -35,6 +35,7 @@ Appium 1.5 does away with most CLI flags that existed previously; the remainder
| --app-wait-activity | appWaitActivity |
| --device-ready-timeout | deviceReadyTimeout |
| --android-coverage | androidCoverage |
+| --android-coverage-end-intent | |
| --avd | avd |
| --avd-args | avdArgs |
| --use-keystore | useKeystore |

MODIFY
docs/en/writing-running-appium/server-args.md
docs/en/writing-running-appium/server-args.md
@@ -74,6 +74,7 @@ All flags are optional, but some are required in conjunction with certain others
|`--app-wait-activity`|false|[DEPRECATED] - (Android-only) Activity name for the Android activity you want to wait for (e.g., SplashActivity)|`--app-wait-activity SplashActivity`|
|`--device-ready-timeout`|5|[DEPRECATED] - (Android-only) Timeout in seconds while waiting for device to become ready|`--device-ready-timeout 5`|
|`--android-coverage`|false|[DEPRECATED] - (Android-only) Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w |`--android-coverage com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation`|
+|`--android-coverage-end-intent`|false| [DEPRECATED] - A broadcast action implemented by yourself which is used to dump coverage into file system. Passed to -a in adb shell am broadcast -a |`--android-coverage-end-intent com.example.pkg.END_EMMA`|
|`--avd`|null|[DEPRECATED] - (Android-only) Name of the avd to launch|`--avd @default`|
|`--avd-args`|null|[DEPRECATED] - (Android-only) Additional emulator arguments to launch the avd|`--avd-args -no-snapshot-load`|
|`--use-keystore`|false|[DEPRECATED] - (Android-only) When set the keystore will be used to sign apks.||

MODIFY
lib/parser.js
lib/parser.js
@@ -576,6 +576,16 @@ const deprecatedArgs = [
'adb shell am instrument -e coverage true -w ',
}],
+ [['--android-coverage-end-intent'], {
+ dest: 'androidCoverageEndIntent',
+ defaultValue: false,
+ required: false,
+ example: 'com.example.pkg.END_EMMA',
+ deprecatedFor: '--default-capabilities',
+ help: '[DEPRECATED] - (Android-only) A broadcast action implemented by yourself which is used ' +
+ 'to dump coverage into file system. Passed to -a in adb shell am broadcast -a',
+ }],
+
[['--avd'], {
dest: 'avd',
defaultValue: null,

Documentation on android test coverage using uiautomator2-driver