测试与安全

ai-test-generation

petrkindlmann/qa-skills

Use AI to write NEW test code from specs, PRDs, user stories, code diffs, bug reports, or OpenAPI specs. Staged pipeline: requirements extraction → risk analysis → coverage matrix → scenario generation → oracle design → test code → human review, with guardrails against hallucinated APIs and weak assertions. Use when: "generate tests from spec," "tests from PRD," "tests from user story," "auto-generate test cases," "AI write tests for me." Not for: testing AI/LLM features in your product — use ai-system-testing. Not for: auditing a pre-existing test suite you did not just generate — use ai-qa-review (Step 7 here only reviews tests THIS pipeline produced). Related: playwright-automation, unit-testing, api-testing, qa-project-context.

  • 1266 次安装
  • 226 星标
  • 收录于

安装命令

npx skills add https://github.com/petrkindlmann/qa-skills --skill ai-test-generation

SKILL.md

Before starting: Check for .agents/qa-project-context.md in the project root. It carries tech stack, test frameworks, naming conventions, selector strategy, and known risk areas that dramatically improve generated test quality.

Quick Route

The pipeline is the same for every input; only the Step 1 extraction emphasis changes. Jump to the matching row, then run Steps 2-7 unchanged.

Input type Step 1 extracts Watch for
PRD / feature spec Entities, business rules, acceptance criteria, NFRs, stated assumptions Implicit requirements inferred from "seamless"/"fast" language
User story + AC Each AC → ≥1 happy + ≥1 negative scenario ACs that hide multiple behaviors in one line
Code diff (git diff main...HEAD) New/changed code paths, modified conditionals, removed behavior Regression scope: test the changed paths, not the whole module
Bug report Repro steps, expected vs actual, environment Write a test asserting expected — fails now, passes after fix
OpenAPI / GraphQL SDL Endpoints, schemas, required fields, enums, auth Validation, auth-failure, and edge cases per endpoint, not just 200s

Playwright projects also pick an agent integration mode — see Discovery Q2.