Files
app_Settings/tests/unit
David Su c267acd0ef SettingsUnitTests: migrate to @SystemApi Builders for WifiInfo & NetworkSelectionStatus
Use the newly created Builder classes to construct
WifiInfo & NetworkSelectionStatus with the
appropriate fields set, so that they can be
parceled/unparceled.

Bug: 138801922
Test: atest SettingsUnitTests
Change-Id: I8dd6bc5d51d1a41ff4b8b2760faaa00b633fc2f7
2020-01-11 18:44:14 -08:00
..
2019-05-13 13:42:01 -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/androidx.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/androidx.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/androidx.test.runner.AndroidJUnitRunner

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