Espresso - bootstraponline/meta GitHub Wiki
Espresso
Run espresso from the command line.
List instrumentation
$ adb shell pm list instrumentation
instrumentation:<test_package_name>/<runner_class> (target=<target_package_name>)
Run located instrumentation
adb shell am instrument -w --no-window-animation <test_package_name>/<runner_class>
Note for Jacoco, a special JacocoRunner is required to work around this android bug.
Spoon
Spoon can be used to run the tests. By listening to the logcat logs (com.android.ddmlib.logcat.LogCatListener), useful reports are generated (html, junit xml, etc.)
# example from https://github.com/square/spoon
java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \
--apk ExampleApp-debug.apk \
--test-apk ExampleApp-debug-androidTest-unaligned.apk \