blob: fc9628532739e4fe914af4c6011d725213ff48c5 [file] [log] [blame]
To build the tests you can use the following command at the root of your android source tree
$ make RetailDemoTests
The test apk then needs to be installed onto your test device via adb for example
$ adb install -r out/target/product/shamu/data/app/RetailDemoTests/RetailDemoTests.apk
To run all tests:
$ adb shell am instrument -w com.android.retaildemo.tests/android.support.test.runner.AndroidJUnitRunner
To run all tests in a specific class:
$ adb shell am instrument -w -e class com.android.retaildemo.<class> com.android.retaildemo.tests/android.support.test.runner.AndroidJUnitRunner
To run a specific test:
$ adb shell am instrument -w -e class com.android.retaildemo.<class>#<test> com.android.retaildemo.tests/android.support.test.runner.AndroidJUnitRunner
More general information can be found at
http://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html