Loading...
Loading...
Writes and runs one Playwright end-to-end test for a single critical user flow (e.g. checkout, booking, sign-up), so the agent can verify its own work in a real browser instead of claiming "it works". Proposes the test plan in plain language first and waits for approval, reuses an existing Playwright setup or installs a minimal one, runs only that spec, and proves the test can actually fail. When the test fails it reports with evidence and never edits the test just to make it pass — the human decides whether the bug is in the app or in the test. Use when the user asks to create an e2e test, a Playwright test, a browser test, or to cover a critical flow with automated QA.
npx skill4agent add adminoryslabs/armory playwright-e2e-testtest.skiptest.fixmeCLAUDE.mdREADMEFlow: <name>
Start at: <url>
Steps:
1. <user action> (e.g. click "Continue")
2. ...
Final assertion: <what must be visible at the end, with its exact text>
Test data: <what it fills in, and whether it writes to a real database>
File: <path of the spec>playwright.config.*npm install -D @playwright/test
npx playwright install chromiumlibnspr4.so: cannot open shared object filesudosudo npx playwright install-deps chromiumplaywright.config.js.tsimport { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
use: {
baseURL: 'http://localhost:3000', // the app's local URL
trace: 'retain-on-failure', // step-by-step recording, kept only when a test fails
screenshot: 'only-on-failure', // evidence for the human
},
webServer: {
command: 'npm run dev', // the project's real dev command
url: 'http://localhost:3000',
reuseExistingServer: true,
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
});test-results/playwright-report/.gitignoregetByRolegetByLabelgetByTextgetByPlaceholdergetByTestIdwaitForTimeoutnetworkidleawait expect(locator).toBeVisible()npx playwright test <path-to-spec> --reporter=listgit diff## E2E test: <flow>
- Spec: <path>
- Result: PASSED | FAILED
- Proof it can fail: <what was broken, and the error it produced>
- Command: npx playwright test <path>- What failed: <step and assertion>
- Evidence: <screenshot, `error-context.md` and trace paths under `test-results/`; open the trace
with `npx playwright show-trace <trace.zip>` — its network tab shows the API status codes>
- Diagnosis: app bug | outdated test | environment (server down, data) — with the reasoning
- Proposed fix: <what to change, and where>