MCP HubMCP Hub
返回技能列表

analyzing-test-coverage

jeremylongshore
更新于 Today
34 次查看
409
51
409
在 GitHub 上查看
testing

关于

This skill analyzes code coverage metrics to identify untested code and generate comprehensive coverage reports. It helps developers improve code quality by pinpointing gaps in test suites and ensuring adequate test coverage. Use trigger terms like "analyze coverage," "code coverage report," or "cov" to activate it.

技能文档

Overview

This skill enables Claude to analyze code coverage metrics, pinpoint areas of untested code, and generate detailed reports. It helps you identify gaps in your test suite and ensure comprehensive code coverage.

How It Works

  1. Coverage Data Collection: Claude executes the project's test suite with coverage tracking enabled (e.g., using nyc, coverage.py, or JaCoCo).
  2. Report Generation: The plugin parses the coverage data and generates a detailed report, including metrics for line, branch, function, and statement coverage.
  3. Uncovered Code Identification: Claude highlights specific lines or blocks of code that are not covered by any tests.

When to Use This Skill

This skill activates when you need to:

  • Analyze the overall code coverage of your project.
  • Identify specific areas of code that lack test coverage.
  • Generate a detailed report of code coverage metrics.
  • Enforce minimum code coverage thresholds.

Examples

Example 1: Analyzing Project Coverage

User request: "Analyze code coverage for the entire project"

The skill will:

  1. Execute the project's test suite with coverage tracking.
  2. Generate a comprehensive coverage report, showing line, branch, and function coverage.

Example 2: Identifying Untested Code

User request: "Show me the untested code in the src/utils.js file"

The skill will:

  1. Analyze the coverage data for src/utils.js.
  2. Highlight the lines of code in src/utils.js that are not covered by any tests.

Best Practices

  • Configuration: Ensure your project has a properly configured coverage tool (e.g., nyc in package.json).
  • Thresholds: Define minimum coverage thresholds to enforce code quality standards.
  • Report Review: Regularly review coverage reports to identify and address coverage gaps.

Integration

This skill can be integrated with other testing and CI/CD tools to automate coverage analysis and reporting. For example, it can be used in conjunction with a linting plugin to identify both code style issues and coverage gaps.

快速安装

/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus/tree/main/test-coverage-analyzer

在 Claude Code 中复制并粘贴此命令以安装该技能

GitHub 仓库

jeremylongshore/claude-code-plugins-plus
路径: backups/skills-migration-20251108-070147/plugins/testing/test-coverage-analyzer/skills/test-coverage-analyzer
aiautomationclaude-codedevopsmarketplacemcp

相关推荐技能

evaluating-llms-harness

测试

该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。

查看技能

go-test

go-test Skill为Go开发者提供全面的测试指导,涵盖单元测试、性能基准测试和集成测试的最佳实践。它能帮助您正确实现表驱动测试、子测试组织、mock接口和竞态检测,同时指导测试覆盖率分析和性能基准测试。当您编写_test.go文件、设计测试用例或优化测试策略时,这个Skill能确保您遵循Go语言的标准测试惯例。

查看技能

generating-unit-tests

该Skill能自动为源代码生成全面的单元测试,支持Jest、pytest、JUnit等多种测试框架。当开发者请求"生成测试"、"创建单元测试"或使用"gut"快捷指令时即可触发。它能智能识别合适框架或按指定框架生成测试用例,显著提升测试效率。

查看技能

component-testing-patterns

测试

这个Skill为开发者提供了基于Vitest浏览器模式的Svelte 5组件测试解决方案。它支持在真实浏览器环境中测试组件,使用Playwright定位器和可访问性模式进行语义化查询。开发者可以利用自动重试的定位器和响应式状态测试来编写可靠的组件测试用例。

查看技能