Install
openclaw skills install @kingaiwork/test-coverage-enforcerScan codebase, identify untested paths, and auto-generate unit test stubs with realistic fixtures. / 扫描代码库,识别未测试路径并自动生成带真实夹具的单元测试桩。
openclaw skills install @kingaiwork/test-coverage-enforcerScan codebase, identify untested paths, and auto-generate unit test stubs with realistic fixtures. / 扫描代码库,识别未测试路径并自动生成带真实夹具的单元测试桩。
🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work
• Scans entire codebase to map untested logic branches and conditionals / 全面扫描代码库,精准锁定未测试的逻辑分支与条件判断,让每一次提交都高枕无忧 • Auto-generates unit test stubs with realistic fixtures and mock data / 自动生成含真实数据夹具的单元测试桩,减少手动编写时间高达80% • Analyzes test coverage gaps in real-time, highlighting critical code paths / 实时分析测试覆盖缺口,高亮关键风险路径,确保核心功能零遗漏 • Integrates seamlessly with CI/CD pipelines to enforce coverage gate rules / 无缝集成CI/CD流水线,自动执行覆盖率门禁,防止低质量代码合入 • Detects redundant or brittle tests and suggests optimization patches / 识别冗余或脆弱测试并建议优化补丁,Pro版更提供一键重构方案 • Generates regression test suites for modified code blocks, Pro users get cross-project analysis / 为修改代码块生成回归测试套件,Pro版解锁跨项目依赖分析与智能扩展
bash npx test-coverage-enforcer scan --dir src --min-coverage 80 Scan the source directory with 80% minimum coverage threshold and auto-generate missing test stubs. / 扫描src目录并设置80%最小覆盖率阈值,自动生成缺失的测试桩文件。
• A senior developer spent hours writing edge-case tests for a payment module. This tool scanned the module and auto-generated 15 test stubs, cutting manual effort by 90%. / 一位高级开发者为支付模块编写边缘测试耗时数小时,该工具扫描模块后自动生成15个测试桩,手动工作量削减90%。 • A startup’s CI pipeline frequently fails due to coverage drops. The enforcer enforces a 75% gate, blocking merges and auto-providing missing tests. / 某初创公司CI流水线因覆盖率下降频繁失败,强制器设置75%门槛,阻止合并并自动提供缺失测试。 • A legacy project had 40% coverage with no documentation. The tool scanned the entire codebase, identified 300 untested paths, and generated stubs with mock data for rapid onboarding. / 遗留项目覆盖率为40%且无文档,工具扫描整个代码库识别300个未测试路径,生成含模拟数据的桩文件,加速新成员上手。
| Feature | Free | Pro |
|---|---|---|
| Core / 核心功能 | ✅ | ✅ |
| Batch / 批量处理 | — | ✅ |
| AI / AI 增强 | — | ✅ |
| Support / 支持 | Community | Priority |
• Unlock cross-repository dependency analysis for complex microservice architectures / 解锁跨仓库依赖分析,专为复杂微服务架构设计,让测试覆盖无盲区 • Gain priority access to premium auto-fix algorithms that reduce false positives by 60% / 获取高级自动修复算法优先权,误报率降低60%,节省团队排查时间 • Activate team dashboards with historical trend tracking and compliance reports / 激活团队仪表盘,含历史趋势追踪与合规报告,从源头把控代码质量\n\n
📦 Published by King AI — kingai.work