test(terminal): support local browser bench runs

This commit is contained in:
zhangheng
2026-06-24 14:48:32 +08:00
parent 21019d82e0
commit a10c638e60
2 changed files with 30 additions and 3 deletions

View File

@@ -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.