Files
app_Settings/tests/unit
Arc Wang 4cd89bb082 Storage Settings Apps category shows image/video/audio APPs
There is AOSP built in file browser for image/video/audio
file category, all APPs except games should be included in
Apps category.

- Shows image/video/audio APPs in APPs category.
- Count Image/Video/Audio APPs storage size to Apps storage size.
- Remove APP size & cache size for Images/Videos/Audios category.

Bug: 170918505
Test: atest StorageAsyncLoaderTest.java
Change-Id: I07e0a3a66a13f36b9e0cbde289d8ba90df4ae295
2021-05-03 20:17:58 +08:00
..
2020-12-16 10:40:49 +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 instrutions 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 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: out/target/product/shamu/testcases/SettingsUnitTests/arm64/SettingsUnitTests.apk"
Install via the following command:
$ adb install -r out/target/product/shamu/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