一键导入
test
Generate test plan, test cases, test data fixtures, and Playwright E2E tests mapped to acceptance criteria.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate test plan, test cases, test data fixtures, and Playwright E2E tests mapped to acceptance criteria.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | test |
| description | Generate test plan, test cases, test data fixtures, and Playwright E2E tests mapped to acceptance criteria. |
| argument-hint | [--plan-only | --e2e-only] |
| context | fork |
| agent | test-engineer |
/test
/test --plan-only
/test --e2e-only
/test — generate all test artefacts: plan, cases, fixtures, and E2E tests./test --plan-only — generate only test-plan.md and test-cases.md. Stop before writing Playwright files./test --e2e-only — skip plan/cases, go straight to Playwright E2E generation. Use when plan already exists.The following must exist before running this skill:
specs/stories/ — user stories with acceptance criteria (one file per story).backend/ and/or frontend/ — source code that the tests will target.project-manifest.json — for base URLs and service port configuration.If any of these are missing, stop and report what is absent. Do not generate tests against an empty or partial codebase.
Read .claude/skills/code-gen/SKILL.md for quality principles (typing, error handling, test structure).
Read .claude/skills/evaluation/SKILL.md for the Playwright patterns and contract verification approach used by the evaluator.
If a references/playwright.md file exists under .claude/skills/testing/, read it now for project-specific Playwright patterns.
Read every story file in specs/stories/. For each story, extract:
Every test case generated must trace to a specific AC. Record the mapping explicitly.
Spawn the test-engineer agent with the full context: story files, source code structure, and the patterns read in Step 1.
The agent operates in the forked context. It must not modify source code.
specs/test_artefacts/)Create specs/test_artefacts/ if it does not exist.
specs/test_artefacts/test-plan.md
specs/test_artefacts/test-cases.md
specs/test_artefacts/test-data/
orders.json, users.json)."foo", 123, or "test" as stand-in values.e2e/)Create e2e/ at the project root if it does not exist.
For each story, generate a Playwright test file named {story-id}.spec.ts.
Rules for Playwright tests:
getByRole, getByLabel, getByText — never CSS selectors or XPath.waitForTimeout. Use expect(locator).toBeVisible() with retry.test() block maps to exactly one acceptance criterion. The test name must reference the AC.specs/test_artefacts/test-data/.Copy the config template:
cp .claude/templates/playwright.config.template.ts playwright.config.ts
Fill in the baseURL values from project-manifest.json. Configure webServer entries for each service that needs to be running during tests.
npx playwright install --with-deps chromium
npx playwright test
All tests must pass on the first run against the target environment. A failing test that was written incorrectly is not acceptable — fix the test before reporting results.
| Path | Purpose |
|---|---|
specs/test_artefacts/test-plan.md | Sprint test plan |
specs/test_artefacts/test-cases.md | Full test case inventory mapped to ACs |
specs/test_artefacts/test-data/ | JSON fixture files per domain entity |
e2e/{story-id}.spec.ts | Playwright tests per story |
playwright.config.ts | Playwright configuration |
getByRole. CSS selectors break on refactors. Use ARIA-based selectors exclusively.waitForTimeout is banned. Network or animation delays must be handled with expect(...).toBeVisible() or waitForResponse.Autonomous build loop with Karpathy ratcheting, GAN evaluator, and session chaining. Iterates story groups until all features pass or stopping criteria met.
Socratic interview to create a Business Requirements Document. First step in the SDLC pipeline.
Generate system architecture, machine-readable schemas, and UI mockups. Spawns planner + ui-designer concurrently.
Evaluation patterns — sprint contract format, three-layer verification, scoring rubric references.
Standard GitHub issue workflow. Branch, reproduce, fix, test, PR.
Generate production code and tests for a story group using agent teams for parallel execution.