Files
app_Settings/tests/unit
Malcolm Chen 6fef2fff5e Remove extra newline in AndroidManifest.
Remove extra newline in AndroidManifest which caused
android.settings.MOBILE_DATA_USAGE not received.

Bug: b/63670955
Test: testcase MobileDataUsageActivityTest
Change-Id: I4a4178141010b128e3d9c8c9721a51b81cbdffff
2017-07-14 15:05:20 -07:00
..
2017-06-14 12:32:44 -07:00

To build the tests you can use the following command at the root of your android source tree
$ make -j SettingsUnitTests

The test apk then needs to be installed onto your test device via for example
$ adb install -r ${ANDROID_PRODUCT_OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk

To run all tests:
$ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

To run all tests in a specific class:
$ adb shell am instrument -w -e class com.android.settings.<class> com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

To run a specific test:
$ adb shell am instrument -w -e class com.android.settings.<class>#<test> com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

More general information can be found at
http://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html