David Dorwin | fe186dd | 2022-05-20 18:35:13 | [diff] [blame] | 1 | # Deploying content_shell and running web_tests on Fuchsia |
| 2 | |
| 3 | [TOC] |
Chong Gu | 4749ec1 | 2021-02-17 01:41:06 | [diff] [blame] | 4 | |
| 5 | General instruction on running and debugging web_tests can be found |
| 6 | [here](../testing/web_tests.md). |
| 7 | |
Chong Gu | 70ee43a1 | 2022-12-08 22:57:37 | [diff] [blame] | 8 | Unlike on other platforms, where tests are directly invoked via the |
| 9 | [blink test script](third_party/blink/tools/blinkpy/web_tests/run_web_tests.py), |
| 10 | Fuchsia layers on top [its own test script] (../../build/fuchsia/test/run_test.py), |
| 11 | which handles preparation such as installing the content_shell binary. |
| 12 | |
Chong Gu | 4749ec1 | 2021-02-17 01:41:06 | [diff] [blame] | 13 | Currently, only |
An Sung | 65d9eab | 2023-07-26 01:38:43 | [diff] [blame] | 14 | [a small subset of web tests](../../third_party/blink/web_tests/TestLists/Default.txt) |
Chong Gu | 70ee43a1 | 2022-12-08 22:57:37 | [diff] [blame] | 15 | can be run on Fuchsia. Build the target `blink_web_tests` first before running any |
Chong Gu | 4749ec1 | 2021-02-17 01:41:06 | [diff] [blame] | 16 | of the commands below: |
| 17 | |
| 18 | ## Hermetic emulation |
| 19 | |
| 20 | The test script brings up an emulator, runs the tests on it, and shuts the |
| 21 | emulator down when finished. |
| 22 | ```bash |
Chong Gu | 70ee43a1 | 2022-12-08 22:57:37 | [diff] [blame] | 23 | $ <output-dir>/bin/run_blink_web_tests |
Chong Gu | 4749ec1 | 2021-02-17 01:41:06 | [diff] [blame] | 24 | ``` |
| 25 | |
| 26 | ## Run on an physical device. |
| 27 | |
Chong Gu | 4749ec1 | 2021-02-17 01:41:06 | [diff] [blame] | 28 | ```bash |
Chong Gu | 70ee43a1 | 2022-12-08 22:57:37 | [diff] [blame] | 29 | $ <output-dir>/bin/run_blink_web_tests --target-id=<device-target-id> |
Weizhong Xia | a33c616 | 2022-05-03 02:11:27 | [diff] [blame] | 30 | ``` |