Files
app_Settings/tests/unit
Doris Ling f2ecc4bf26 Add test to verify external account settings is shown.
- add a test service that provides a test authenticator and a test
preference screen. Creates corresponding test account and verifies that
the preferences defined in the authenticator is displayed from the
account detail page.

Change-Id: Iab87177ae500d0a36272cf8ecf464139a3dc07cd
Fixes: 35353708
Test: make SettingsUnitTests
2018-02-09 14:27:06 -08:00
..

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

The test apk then needs to be installed onto your test device via for example
$ adb install -r out/target/product/shamu/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