Agent Skills › langwatch/langwatch › browser-test

browser-test

GitHub

通过真实浏览器场景验证功能,生成带证据的通过/失败报告。不直接驱动浏览器,而是指导使用 haven browser 工具执行步骤、截图及记录结果。

.claude/skills/browser-test/SKILL.md langwatch/langwatch

Trigger Scenarios

browser test verify this in the browser walk the scenarios check the feature live

Install

npx skills add langwatch/langwatch --skill browser-test -g -y
More Options

Non-standard path

npx skills add https://github.com/langwatch/langwatch/tree/main/.claude/skills/browser-test -g -y

Use without installing

npx skills use langwatch/langwatch@browser-test

指定 Agent (Claude Code)

npx skills add langwatch/langwatch --skill browser-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add langwatch/langwatch --all -g -y

预览 repo 内 skill

npx skills add langwatch/langwatch --list

SKILL.md

Frontmatter
{
    "name": "browser-test",
    "description": "Check that a feature works by walking its scenarios in a real browser and writing a pass\/fail report with evidence. A recipe over `haven browser`: no test files, no browser commands of its own. Use when someone says 'browser test', 'verify this in the browser', 'walk the scenarios', 'check the feature live', or hands you a specs\/*.feature file to confirm on a running stack.",
    "argument-hint": "[feature description or feature-file-path]",
    "user-invocable": true
}

Browser test: walk the scenarios, report the evidence

This skill is the recipe from "scenarios" to "report". It does not drive the browser itself. haven browser is the one way to drive a browser (see haven-browser; sign-in is --as admin, see haven-auth; seeded logins are haven-seed). Playwright's MCP tools and playwright-cli are refused where haven is installed, and MCP browser tools are never used by lanes. Use plain Playwright only for something haven cannot reach, and say so in the report.

1. Prepare

  • A feature file path: read it and turn each scenario into a numbered step with an expected result. A plain description: use it as the one step list. Neither: smoke test (app loads, admin sign-in works, the dashboard renders).
  • Stack: haven status. If none runs, start one only when asked (haven-lifecycle), and say if you did. The base URL is whatever haven status prints; use that one origin for the whole run. A different hostname for the same app (127.0.0.1, say) fails sign-in with a 403.
  • A plain pnpm dev stack serves the built UI; pnpm dev:hmr serves Vite. First loads can take tens of seconds under Vite.
  • Workspace: browser-tests/<feature>/<YYYY-MM-DD>/ (gitignored; never commit it).

2. Seed only what the steps need

Decide which data must exist (a suite with one scenario, one trace, a completed run). Create it through the UI where practical; use the API or a seed (haven db seed, haven-seed) for bulk data. Keep it minimal. Credentials for ingestion come from a seeded login or a personal scoped key, never a project key read from settings, and never pasted into a prompt or a report.

3. Walk it

Use one lane per run (--lane bt-<feature> --as admin). For each step: act, check the expected result in the diff or a snapshot --grep, and record PASS or FAIL.

  • Take a screenshot for each step that checks how something looks (drawer width, card padding, colour, clipping, dark mode) and for every failure. A snapshot finds controls; it cannot show paint. Save with --out browser-tests/<feature>/<date>/NN-name.png.
  • On a failure: screenshot, haven browser console --level error, haven browser network --failed, mark it FAIL and go on. Do not debug the app or edit code during the walk.
  • Overlays are a routed singleton with a back stack: assert that one overlay is open, that back returns to the caller and that a draft survives. Two stacked copies of the same drawer is a defect to report, not a quirk to press Escape past.
  • Waits are --wait-for 'text=...', never sleeps. Close the lane when done.

4. Report

Write browser-tests/<feature>/<date>/report.md:

# Browser test: <feature>

**Date / stack URL / branch / PR (if known)**

| #   | Scenario | Result | Evidence    |
| --- | -------- | ------ | ----------- |
| 1   | <name>   | PASS   | 01-name.png |

## Failures

- **2:** expected X, saw Y (console and network lines).

Return the table to the caller. Publishing is a separate act, done only when asked: upload screenshots with gh issue comment --attach file#alt (see the repository's PR rules) and put the table in a PR comment, not the squash-merge body.

Rules

  • Never ask the user for a port, account or browser: resolve them as above.
  • Read HOW_TO.md beside this file for gotchas before the first run.
  • Do not create test files. To turn a walk into an e2e test use haven browser record (haven-browser), then record export.
  • For a live session with a person watching, see browser-pair.

Version History

  • c0c14dc Current 2026-10-19 19:32

    重构为直接指导使用 haven browser 工具的配方模式,移除子代理编排逻辑,明确禁止使用 Playwright MCP 工具。

  • 12615f1 2026-08-20 10:00

Same Skill Collection

.claude/skills/analyticssim/SKILL.md
.claude/skills/browser-pair/SKILL.md
.claude/skills/chakra-ui-builder/SKILL.md
.claude/skills/chakra-ui-refactor/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/code-search/SKILL.md
.claude/skills/feature-map/SKILL.md
.claude/skills/githubsim/SKILL.md
.claude/skills/haven-auth/SKILL.md
.claude/skills/haven-db/SKILL.md
.claude/skills/haven-orb/SKILL.md
.claude/skills/haven-play/SKILL.md
.claude/skills/haven-seed/SKILL.md
.claude/skills/haven-setup/SKILL.md
.claude/skills/idpsim/SKILL.md
.claude/skills/lambdasim/SKILL.md
.claude/skills/langwatch-kanban/SKILL.md
.claude/skills/llmsim/SKILL.md
.claude/skills/mailsim/SKILL.md
.claude/skills/module/SKILL.md
.claude/skills/outboundsim/SKILL.md
.claude/skills/ownership/SKILL.md
.claude/skills/repo-tree/SKILL.md
.claude/skills/storagesim/SKILL.md
.claude/skills/voicesim/SKILL.md
plugins/langwatch/skills/langwatch/SKILL.md
services/langy-agent/skills/github/SKILL.md
skills/_compiled/native/agent-best-practices/SKILL.md
skills/_compiled/native/agent-performance/SKILL.md
skills/_compiled/native/automations/SKILL.md
skills/_compiled/native/code-changes/SKILL.md
skills/_compiled/native/context-sweet-spot/SKILL.md
skills/_compiled/native/daily-insights/SKILL.md
skills/_compiled/native/dashboard-widgets/SKILL.md
skills/_compiled/native/datasets/SKILL.md
skills/_compiled/native/debug-instrumentation/SKILL.md
skills/_compiled/native/debug-with-langwatch/SKILL.md
skills/_compiled/native/drive-the-ui/SKILL.md
skills/_compiled/native/eval-triage/SKILL.md
skills/_compiled/native/evaluate-multimodal/SKILL.md
skills/_compiled/native/evaluations/SKILL.md
skills/_compiled/native/experiments/SKILL.md
skills/_compiled/native/find-traces/SKILL.md
skills/_compiled/native/generate-rag-dataset/SKILL.md
skills/_compiled/native/github/SKILL.md
skills/_compiled/native/guided-onboarding/SKILL.md
skills/_compiled/native/level-up/SKILL.md
skills/_compiled/native/lwql-charts/SKILL.md
skills/_compiled/native/online-evaluations/SKILL.md

Metadata

Files
0
Version
c0c14dc
Hash
b8b38cb4
Indexed
2026-08-20 10:00

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-25 22:56
浙ICP备14020137号-1