ai-test-generation

仓库创建 2026年3月24日最近提交 1 个月前SkillHot 收录 2 天前
▸ 精选理由

分阶段强制中间产物,减少模型幻觉和无效断言,适合需要可追溯测试的团队。

▸ 风险提示

生成代码需要代码库访问并可能引入不安全测试用例,需人工审查

这个 Skill 做什么

从规格、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.

开发编程测试生成自动化测试管道化通用
47
Stars
10
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/ai-test-generation/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/ai-test-generation/SKILL.md"
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
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有