OLD | NEW |
---|---|
1 # Android Test Instructions | 1 # Android Test Instructions |
2 | 2 |
3 Device Setup Tests are runnable on physical devices or emulators. See the | 3 Device Setup Tests are runnable on physical devices or emulators. See the |
4 instructions below for setting up either a physical device or an emulator. | 4 instructions below for setting up either a physical device or an emulator. |
5 | 5 |
6 [TOC] | 6 [TOC] |
7 | 7 |
8 ## Physical Device Setup **ADB Debugging** | 8 ## Physical Device Setup **ADB Debugging** |
9 | 9 |
10 In order to allow the ADB to connect to the device, you must enable USB | 10 In order to allow the ADB to connect to the device, you must enable USB |
11 debugging: | 11 debugging: |
12 * Before Android 4.1 (Jelly Bean): | 12 |
13 * Go to "System Settings" | 13 * Before Android 4.1 (Jelly Bean): |
14 * Go to "Developer options" | 14 * Go to "System Settings" |
15 * Check "USB debugging". | 15 * Go to "Developer options" |
16 * Un-check "Verify apps over USB". | 16 * Check "USB debugging". |
17 * On Jelly Bean, developer options are hidden by default. To unhide them: | 17 * Un-check "Verify apps over USB". |
18 * Go to "About phone" | 18 * On Jelly Bean, developer options are hidden by default. To unhide them: |
19 * Tap 10 times on "Build number" | 19 * Go to "About phone" |
20 * The "Developer options" menu will now be available. | 20 * Tap 10 times on "Build number" |
21 * Check "USB debugging". | 21 * The "Developer options" menu will now be available. |
22 * Un-check "Verify apps over USB". | 22 * Check "USB debugging". |
23 * Un-check "Verify apps over USB". | |
23 | 24 |
24 ### Screen | 25 ### Screen |
25 | 26 |
26 You MUST ensure that the screen stays on while testing: `adb shell svc power | 27 You MUST ensure that the screen stays on while testing: `adb shell svc power |
27 stayon usb` Or do this manually on the device: Settings -> Developer options | 28 stayon usb` Or do this manually on the device: Settings -> Developer options |
28 -> Stay Awake. | 29 -> Stay Awake. |
29 | 30 |
30 If this option is greyed out, stay awake is probably disabled by policy. In that | 31 If this option is greyed out, stay awake is probably disabled by policy. In that |
31 case, get another device or log in with a normal, unmanaged account (because the | 32 case, get another device or log in with a normal, unmanaged account (because the |
32 tests will break in exciting ways if stay awake is off). | 33 tests will break in exciting ways if stay awake is off). |
33 | 34 |
34 ### Enable Asserts! | 35 ### Enable Asserts! |
35 | 36 |
36 `adb shell setprop debug.assert 1` | 37 adb shell setprop debug.assert 1 |
37 | 38 |
38 ### Disable Verify Apps | 39 ### Disable Verify Apps |
39 | 40 |
40 You may see a dialog like | 41 You may see a dialog like |
41 [this one](http://www.samsungmobileusa.com/simulators/ATT_GalaxyMega/mobile/scre ens/06-02_12.jpg), | 42 [this one](http://www.samsungmobileusa.com/simulators/ATT_GalaxyMega/mobile/scre ens/06-02_12.jpg), |
42 which states, _Google may regularly check installed apps for potentially harmful | 43 which states, _Google may regularly check installed apps for potentially harmful |
43 behavior._ This can interfere with the test runner. To disable this dialog, run: | 44 behavior._ This can interfere with the test runner. To disable this dialog, run: |
44 `adb shell settings put global package_verifier_enable 0` | 45 `adb shell settings put global package_verifier_enable 0` |
45 | 46 |
46 ## Emulator Setup | 47 ## Emulator Setup |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 by the Android SDK. When doing so, be sure to enable GPU emulation in hardware | 89 by the Android SDK. When doing so, be sure to enable GPU emulation in hardware |
89 settings, since Chromium requires it to render. | 90 settings, since Chromium requires it to render. |
90 | 91 |
91 ## Building Tests | 92 ## Building Tests |
92 | 93 |
93 It may not be immediately obvious where your test code gets compiled to, so here | 94 It may not be immediately obvious where your test code gets compiled to, so here |
94 are some general rules: | 95 are some general rules: |
95 | 96 |
96 * If your test code lives under /content, it will probably be built as part of | 97 * If your test code lives under /content, it will probably be built as part of |
97 the content\_shell\_test\_apk * If your test code lives under /chrome (or | 98 the content\_shell\_test\_apk * If your test code lives under /chrome (or |
98 higher), it will probably be built as part of the chrome\_public\_test\_apk * | 99 higher), it will probably be built as part of the chrome\_public\_test\_apk * |
nodir
2015/08/29 00:53:49
replace \_ with _ here and in other places.
Are y
Bons
2015/08/29 15:29:26
formatting error. shouldn't be bold. should be a l
| |
99 (Please fill in more details here if you know them). | 100 (Please fill in more details here if you know them). |
100 | 101 |
101 NB: We used to call the chrome\_public\_test\_apk the | 102 NB: We used to call the chrome\_public\_test\_apk the |
102 chromium\_shell\_test\_apk. There may still be references to this kicking | 103 chromium\_shell\_test\_apk. There may still be references to this kicking |
103 around, but wherever you see chromium\_shell\_test you should replace with | 104 around, but wherever you see chromium\_shell\_test you should replace with |
104 chrome\_public\_test. | 105 chrome\_public\_test. |
105 | 106 |
106 Once you know what to build, just do it like you normally would build anything | 107 Once you know what to build, just do it like you normally would build anything |
107 else, e.g.: `ninja -C out/Release chrome_public_test_apk` | 108 else, e.g.: `ninja -C out/Release chrome_public_test_apk` |
108 | 109 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 See | 254 See |
254 https://sites.google.com/a/chromium.org/dev/developers/testing/webkit-layout-tes ts | 255 https://sites.google.com/a/chromium.org/dev/developers/testing/webkit-layout-tes ts |
255 | 256 |
256 ## Running GPU tests | 257 ## Running GPU tests |
257 | 258 |
258 (e.g. the "Android Debug (Nexus 7)" bot on the chromium.gpu waterfall) | 259 (e.g. the "Android Debug (Nexus 7)" bot on the chromium.gpu waterfall) |
259 | 260 |
260 See http://www.chromium.org/developers/testing/gpu-testing for details. Use | 261 See http://www.chromium.org/developers/testing/gpu-testing for details. Use |
261 --browser=android-content-shell. Examine the stdio from the test invocation on | 262 --browser=android-content-shell. Examine the stdio from the test invocation on |
262 the bots to see arguments to pass to src/content/test/gpu/run\_gpu\_test.py. | 263 the bots to see arguments to pass to src/content/test/gpu/run\_gpu\_test.py. |
OLD | NEW |