0

android_test_instructions.md: Mention autotest.py and --list-tests

Bug: 1347537
Change-Id: Ie751611bc5aa52fa7c00be34d5aafe17709657be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788451
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Benjamin Joyce <bjoyce@chromium.org>
Commit-Queue: Benjamin Joyce <bjoyce@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1029330}
This commit is contained in:
Andrew Grieve
2022-07-28 17:16:19 +00:00
committed by Chromium LUCI CQ
parent 934806029d
commit 31a294a040
2 changed files with 23 additions and 1 deletions

@ -359,7 +359,7 @@ for more on debugging, including how to debug Java code.
### Testing
For information on running tests, see
[Android Test Instructions](testing/android_test_instructions.md).
[Android Test Instructions](/testing/android/docs/README.md)
### Faster Edit/Deploy

@ -99,6 +99,16 @@ Java test files vary a bit more widely than their C++ counterparts:
Once you know what to build, just do it like you normally would build anything
else, e.g.: `ninja -C out/Release chrome_public_test_apk`
### Determining Test Target
If you do not know what target a test file belongs to, you can use
`//tools/autotest.py` to figure it out fo you:
```sh
# Builds relevant test target and then runs the test:
tools/autotest.py -C <output directory> TestClassName
```
## Running Tests
All functional tests should be runnable via the wrapper scripts generated at
@ -115,6 +125,18 @@ The commands used by the buildbots are printed in the logs. Look at
https://build.chromium.org/ to duplicate the same test command as a particular
builder.
### Listing Available Tests
Use `--list-tests` to list what tests are available.
```sh
# Prints out all available tests:
<output directory>/bin/run_<target_name> --list-tests
# Prints out all available tests that match a filter:
<output directory>/bin/run_<target_name> --list-tests -f "*MyFilter*"
```
### INSTALL\_FAILED\_CONTAINER\_ERROR or INSTALL\_FAILED\_INSUFFICIENT\_STORAGE
If you see this error when the test runner is attempting to deploy the test