技能 编程开发 自动化浏览器UI测试

自动化浏览器UI测试

v20260716
browser-test
用于执行全面的自动化UI测试。本工具能够记录用户在浏览器中的所有复杂交互行为,包括点击、表单填写和数据验证。它生成可回放的测试工件,适用于验证用户流程、检测前端回归和重跑存储的测试会话。
获取技能
116 次下载
概览

Browser Test

Automated UI testing. Now backed by a recorded RVF session container instead of an ephemeral run, so every test produces a replayable artifact.

When to use

  • Verifying UI functionality, user flows, or that frontend changes work in a real browser.
  • Producing a baseline session that future regressions can diff against.
  • Re-running a stored test session when CI fails (no need to re-author the test).

Steps

  1. Record the test run by composing browser-record:
    • Allocates an RVF container with --kind browser-session.
    • Begins a ruvector trajectory.
  2. Drive interactionsbrowser_open, browser_click, browser_fill, browser_type, browser_select. Each action emits a trajectory-step.
  3. Wait for elements / network idle via browser_wait before assertions.
  4. Validate with browser_get-text / browser_get-value / browser_get-title / browser_get-url. Validation outcomes go into findings.md inside the RVF container.
  5. Screenshot before / after key interactions for visual regression. Filenames follow <step-id>.png.
  6. Snapshot the accessibility tree at navigation boundaries.
  7. End the session: trajectory-end --verdict pass|fail, rvf compact, AgentDB index in browser-sessions.
  8. (Optional) Diff against --against <prior-session-id>: invoke browser-screenshot-diff to compare the new run with a baseline.

Navigation

  • browser_back / browser_forward for history navigation
  • browser_reload to refresh the page
  • browser_scroll to scroll to elements or coordinates

What changed from v0.1.0

  • The skill no longer ends with browser_close alone — it ends with the session-end protocol.
  • Selectors discovered during the test land in browser-selectors (host:intent), so the next test can find them by embedding similarity.
  • Validation outputs pass aidefence_is_safe before any LLM-facing summary; injection-flagged content is quarantined to findings.md.
  • The same skill, used in CI, now produces an artifact that /ruflo-browser replay can re-drive.

Tips

  • Use browser_wait before assertions to handle async rendering.
  • For visual regression, save the parent session id and pass --against <id> on the next run.
  • Use browser_eval for custom JavaScript assertions — but redact any returned strings via the aidefence_is_safe gate before logging.
信息
Category 编程开发
Name browser-test
版本 v20260716
大小 3.51KB
更新时间 2026-07-18
语言