]>
Commit | Line | Data |
---|---|---|
cdc7bbd5 XL |
1 | The tests present here are used to test the generated HTML from rustdoc. The |
2 | goal is to prevent unsound/unexpected GUI changes. | |
3 | ||
4 | This is using the [browser-ui-test] framework to do so. It works as follows: | |
5 | ||
6 | It wraps [puppeteer] to send commands to a web browser in order to navigate and | |
7 | test what's being currently displayed in the web page. | |
8 | ||
9 | You can find more information and its documentation in its [repository][browser-ui-test]. | |
10 | ||
136023e0 XL |
11 | If you need to have more information on the tests run, you can use `--test-args`: |
12 | ||
13 | ```bash | |
923072b8 | 14 | $ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --debug |
136023e0 XL |
15 | ``` |
16 | ||
923072b8 FG |
17 | If you don't want to run in headless mode (helpful to debug sometimes), you can use |
18 | `--no-headless`: | |
136023e0 | 19 | |
923072b8 FG |
20 | ```bash |
21 | $ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-headless | |
22 | ``` | |
23 | ||
24 | To see the supported options, use `--help`. | |
25 | ||
26 | Important to be noted: if the chromium instance crashes when you run it, you might need to | |
27 | use `--no-sandbox` to make it work: | |
28 | ||
29 | ```bash | |
30 | $ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-sandbox | |
31 | ``` | |
136023e0 | 32 | |
cdc7bbd5 XL |
33 | [browser-ui-test]: https://github.com/GuillaumeGomez/browser-UI-test/ |
34 | [puppeteer]: https://pptr.dev/ |