Files
app_Settings/tests/unit
Matthew DeVore c4dd7a8288 Add flag for surfacing display topology prototype
This will force the topology pane to show in the displays list UI, and
make the displays list UI accessible from the connected devices
fragment, regardless of the number of actual devices connected.

Once the display topology pane is using real data, this will still be
useful to not skip the display list UI, which currently can only be
shown when there is more than one external display connected.

To turn off, use:
$ adb shell device_config put display_manager com.android.settings.flags.display_topology_pane_in_display_list false

Test: verify "External Display" is always shown in connected devices list
Test: verify displays list is shown when 0 or 1 external display is connected
Bug: b/352648432
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Change-Id: Ic9205c69d9de09e6fb8ae33e17fbf00fe5574447
2024-11-18 12:36:56 -06:00
..
2024-01-12 16:19:47 +00:00

The simplest way to run all SettingsUnitTests is with atest
$ atest SettingsUnitTests

A single class can also be tested with the following command
$ atest -c <YourClassName>

// The following instructions show how to run the test suite using make + adb //

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. The apk's location will vary
depending on your device model and architecture. At the end of the make command's output, there
should be a line similar to the following:
"Copy: ${ANDROID_PRODUCT_OUT}/testcases/SettingsUnitTests/arm64/SettingsUnitTests.apk"
Install via the following command:
$ adb install -r ${ANDROID_PRODUCT_OUT}/testcases/SettingsUnitTests/arm64/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