unit-testing
Skill0 starsChanged 8 months agoMITView on GitHub
根据程序设计与任务拆分产出单元测试用例与预期结果,为代码开发提供验收标准。全栈工作流第 6 阶段。
20 other projects use a version of this.
Adopted by
Most recently taken up by
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- petrkindlmann/qa-skillstheir own version, first seen Oct 25, 2026
- lggarrison/agent-skillstheir own version, first seen Oct 25, 2026
- r-portas/skillstheir own version, first seen Oct 20, 2026
- prinx/agentstheir own version, first seen Oct 20, 2026
- sb-dev/narrative-production-skillstheir own version, first seen Oct 20, 2026
Used with
Projects with it also use database-testing, contract-testing and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
petrkindlmannSkilldatabase-testing
Validate database integrity, test migrations forward and backward, verify schema constraints, manage seed data, detect migration drift, and identify query performance issues. Covers PostgreSQL, MySQL, MongoDB with Prisma, TypeORM, Drizzle, and SQLAlchemy, plus Testcontainers test databases. Use when: "database test," "migration test," "migration rollback," "rollback test," "data integrity," "SQL test," "schema validation," "seed data," "query performance," "Testcontainers." Not for: synthetic data generation/masking at scale — use test-data-management; Docker/IaC test-environment provisioning — use test-environments; SQL injection — use security-testing. Related: test-data-management, test-environments, security-testing, ci-cd-integration.
Also in 3 projects that use this
petrkindlmannSkillcontract-testing
Implement consumer-driven contract testing with Pact-JS (v16). Covers consumer test writing, broker-driven provider verification, Pact Broker setup, can-i-deploy as a deployment gate, webhook-triggered verification, pending pacts, and schema-first vs consumer-first approaches (OpenAPI/Ajv, Schemathesis). Use when: "contract test," "Pact," "consumer-driven," "API contract," "provider verification," "can-i-deploy." Not for: stubbing or mocking a dependency to isolate a test — use service-virtualization; general REST/GraphQL endpoint assertions against your own API — use api-testing. Related: api-testing, service-virtualization, ci-cd-integration, test-environments.
Also in 3 projects that use this
jarosser06Skilltest-strategy
Plans pytest test strategies for Drift's 90%+ coverage requirement using coverage analysis, edge case identification, and test suite design. Use when determining what tests to write, analyzing coverage gaps, or planning test strategies.
Also in 4 projects that use this
etewiahSkille2e-testing
Playwright E2E testing and Lighthouse performance auditing. Use when setting up E2E tests, running Playwright tests, performing Lighthouse audits, or debugging E2E test failures.
Also in 4 projects that use this
Microsoft AzureSkillrelease-readiness
Complete ODIN release documentation and validation checks before declaring user-visible work complete, preparing a release, or opening the Release-to-main pull request.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 4 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- pulsejet/memories★ 3.9ksame name
- lichtblick-suite/lichtblick★ 1.2ksame name
- javierbrea/eslint-plugin-boundaries★ 1ksame name
- petrkindlmann/qa-skills★ 209same name
- kid-sid/claude-spellbook★ 190same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- dprakash2101/dotnet-production-agent-skills★ 4same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- sb-dev/narrative-production-skills★ 2same name
- axross/skills★ 1same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- .claude/skills/CLAUDE.mdCLAUDE.md
- code-developmentSkill
- dev-workflowSkill
- history-managerSkill
- program-designSkill
- requirements-analysisSkill
- self-verificationSkill
- task-breakdownSkill
- technical-reviewSkill
- technology-selectionSkill
The file
Files
单元测试设计
何时使用
- 全栈工作流第 6 阶段:任务拆分完成后、代码开发之前。
- 用户要求先写测试或设计测试用例时。
输入
读取当前迭代目录下的:
- 程序设计文档(
program-design-{id}.md)—— 模块、接口、数据模型 - 任务拆分文档(
task-breakdown-{id}.md)—— 按任务单元组织用例
执行要点
- 按任务组织:以任务拆分中的任务 ID 为单位组织测试用例。
- 粒度:以「可测单元」为单位(函数、类方法、API 端点、前端逻辑块)。
- 覆盖:正常路径 + 边界(空值、上限、类型错误) + 异常(网络失败、权限不足)。
- 预期:每个用例写明预期结果或断言要点(返回值、状态码、副作用、UI 状态)。
- Mock 策略:标注哪些依赖需要 mock(数据库、外部 API、文件系统)。
- 覆盖率目标:核心业务模块建议 ≥80%,工具/配置类可放宽。
产出
- 使用 templates/test-case-template.md 产出测试用例文档,供「代码开发」按用例实现并验证。
文档与状态
- 产出写入
docs/{current_iteration_id}/unit-testing-{unit_testing_id}.md。 - 开始前:调用
history-managerskill 的get-phase unit_testing和check-file确认是否已完成。 - 完成后:调用
history-managerskill 的set-phase unit_testing {unit_testing_id}记录并推进状态。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

