Files
app_Settings/tests/unit
Mill Chen 623eb5a904 Create the default static cards for Contextual Settings Homepage
Adding three default ContextualCard data to CardContentProvider, in case
of empty database or no SettingsIntelligence, to keep Contextual
Settings Homepage working well.

Bug: 113372471
Test: visual, atest SettingsHomepageActivityTest
Change-Id: Id7b26818e10f7945b2618100901310a005d8cc0d
2018-09-28 14:23:14 -07: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