ai-test-generation
分阶段强制中间产物,减少模型幻觉和无效断言,适合需要可追溯测试的团队。
生成代码需要代码库访问并可能引入不安全测试用例,需人工审查
从规格、PRD 或问题报告自动生成结构化可审的测试代码。
把规格、PRD、用户故事或 bug 报告自动变成结构化、可审的测试代码,输出从假设到断言的中间产物便于审查。适合在需要从需求、代码 diff 或 OpenAPI 快速生成测试用例时使用。特点是分阶段(需求抽取、风险分析、覆盖矩阵、oracle 设计等)约束模型,能避免编出不存在的接口或无效断言,结果更容易追踪和人工复核。
▸ 展开 SKILL.md 英文原文
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.
帮我安装这个 skill:https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/ai-test-generation/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/ai-test-generation/SKILL.md"<objective> LLMs will happily emit fifty plausible-looking tests that assert nothing, target endpoints that do not exist, and duplicate each other. This skill is a staged pipeline that forces structured intermediates — assumptions, coverage matrix, oracle definitions — out of the model BEFORE any test code, so what you get is traceable, reviewable, and grounded in the real codebase instead of ad-hoc generated noise. **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. </objective> ## Quick Route The pipeline is