test(terminal): support local browser bench runs
This commit is contained in:
10
README.md
10
README.md
@@ -21,16 +21,22 @@ Change `app_config/src/lib.rs` to test another base path.
|
||||
The terminal benchmark script connects to an already-running dev server; it does
|
||||
not start or stop services.
|
||||
|
||||
Install the Node dependency and Chromium browser once before running it:
|
||||
Install the Node dependency once before running it:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npx playwright install chromium
|
||||
```
|
||||
|
||||
```bash
|
||||
npm run terminal:bench -- --url http://127.0.0.1:3100/rustui/terminal
|
||||
```
|
||||
|
||||
If Playwright's browser download is slow, use an installed Chrome/Chromium
|
||||
instead:
|
||||
|
||||
```bash
|
||||
npm run terminal:bench -- --url http://127.0.0.1:3100/rustui/terminal --browser-executable /usr/bin/google-chrome
|
||||
```
|
||||
|
||||
It writes `target/terminal-bench/terminal-bench.json` plus screenshots when
|
||||
Playwright is available in the workspace.
|
||||
|
||||
Reference in New Issue
Block a user