Unit Testing

petrkindlmann/qa-skills/skills/unit-testing

作者 petrkindlmannb3bb61bd268bMIT168 个星标收录于 2026年10月9日更新于 2026年10月9日仓库4个月前更新

Write effective unit tests with Jest, Vitest, or pytest. Covers the test-doubles taxonomy (stub/spy/mock/fake), Arrange-Act-Assert, coverage threshold configuration and CI gating, snapshot testing, fake timers, and mutation testing with Stryker/mutmut. Use when: "unit test," "Jest," "Vitest," "pytest," "mock," "coverage threshold," "test doubles," "mutation testing," "fake timers," "snapshot test." Not for: interpreting coverage reports or finding coverage gaps — use coverage-analysis; AI generating the test code for you — use ai-test-generation; auditing existing tests for smells — use ai-qa-review; browser/component rendering assertions — use cypress-automation or visual-testing. Related: coverage-analysis, ci-cd-integration, ai-test-generation, shift-left-testing.

仅公开文件列表。将技能安装到工作区后即可查看文件内容。

路径大小类型
references/patterns.md8.1 KBtext/markdown
SKILL.md15.3 KBtext/markdown

来源与署名

来源:petrkindlmann/qa-skills位于skills/unit-testing提交b3bb61b

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 petrkindlmann/qa-skills 的技能

Visual Testing

petrkindlmann

指导使用 Playwright 截图以及 Chromatic、Percy、Argos CI 等托管工具进行视觉回归测试。

Software Development1684个月前更新

Test Suite Curation

petrkindlmann

Audit a whole regression suite and prune/restructure it with evidence: per-test coverage fingerprinting, AST near-duplicate clustering, CI-history mining for never-failing and flaky tests, prune decision rules (redundant/obsolete/low-value/keep), smoke/core/extended tiering by risk and defect-detection history, and a defensible "what we deleted and why" record. Deletion is destructive — quarantine and human sign-off are mandatory. Use when: "audit the test suite," "prune redundant tests," "find duplicate tests," "which tests can we delete," "restructure into smoke/core/extended," "is this test pulling its weight," "shrink the regression suite." Not for: Judging whether an individual test is WELL-WRITTEN (smells, assertions) — that is ai-qa-review. Healing one flaky test at runtime — that is test-reliability. Bulk selector regeneration after a UI refactor — that is selector-drift-recovery. Related: ai-qa-review, coverage-analysis, test-reliability, risk-based-testing, qa-project-context.

待分类1684个月前更新

Test Strategy

petrkindlmann

Produce a multi-quarter QA strategy document. Covers scope, risk-based prioritization, test levels (unit/integration/E2E), pyramid analysis, entry/exit criteria, quality KPIs, tool selection rationale, CI scaling levers, and timeline planning. Output is an actionable strategy document, not a shelf document. Use when: "test strategy," "QA strategy doc," "testing approach," "QA roadmap," "multi-quarter QA direction." Not for: a single-sprint or single-release plan — use test-planning. Not for: identifying which areas carry the most risk — use risk-based-testing first. Related: risk-based-testing, qa-metrics, release-readiness, test-planning, test-reliability.

待分类1684个月前更新

Test Planning

petrkindlmann

为单个冲刺或发布制定一页式测试计划,涵盖覆盖映射、工作量估算、优先级排序、资源分配与排期。

Productivity & Workflow1684个月前更新

Test Migration

petrkindlmann

指导测试套件在不同框架之间增量迁移,例如 Selenium、Cypress 或 Jest 迁移到 Playwright 或 Vitest,并支持并行 CI。

Software Development1684个月前更新

Test Data Management

petrkindlmann

指导使用工厂、夹具和合成生成来创建、播种、匿名化和清理确定、隔离的测试数据。

Software Development1684个月前更新