OSDN Git Service

Merge "Back-port ag/2491664" into nyc-mr1-dev am: 87c77fba92 am: 54e508ca63 am: 4fc6c...
[android-x86/packages-apps-Settings.git] / tests / unit / README
1 To build the tests you can use the following command at the root of your android source tree
2 $ make -j SettingsUnitTests
3
4 The test apk then needs to be installed onto your test device via for example
5 $ adb install -r ${ANDROID_PRODUCT_OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk
6
7 To run all tests:
8 $ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
9
10 To run all tests in a specific class:
11 $ adb shell am instrument -w -e class com.android.settings.<class> com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
12
13 To run a specific test:
14 $ adb shell am instrument -w -e class com.android.settings.<class>#<test> com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
15
16 More general information can be found at
17 http://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html