test-coverage-improver

Analyzes Python test coverage reports and proposes high-impact tests for uncovered code paths.

6|2|Updated Aug 22, 2024
One-click install
npx skills add https://github.com/NQ-lovecpp/cpp_chatsystem --skill test-coverage-improver-nq-lovecpp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-coverage-improver
Source: https://github.com/NQ-lovecpp/cpp_chatsystem/tree/main/ChatSystem-Backend/8.Agent_Server/examples/openai-agents-python-main/.agents/skills/test-coverage-improver
Command: npx skills add https://github.com/NQ-lovecpp/cpp_chatsystem --skill test-coverage-improver-nq-lovecpp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need to improve and maintain high test coverage in the OpenAI Agents Python repository, ensuring code robustness and reliability.

Core Features & Use Cases

  • Coverage Analysis: Runs make coverage to generate coverage reports (.coverage, coverage.xml).
  • Gap Identification: Pinpoints files and lines with low or no test coverage.
  • Test Proposal: Suggests high-impact tests to cover critical code paths and uncovered areas.
  • User Approval Workflow: Seeks explicit user consent before writing any new tests.
  • Use Case: After a new feature is added, use this Skill to identify any un-tested code paths and automatically generate relevant tests to ensure the feature is fully covered.

Quick Start

Run make coverage to regenerate coverage data and then analyze the results.

Frequently Asked Questions about test-coverage-improver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify untested code paths in my Python repository?

To identify untested code paths, run `make coverage` to generate a report. The skill then analyzes these results to pinpoint specific files and lines with low or no test coverage.

What is the best way to generate tests for uncovered lines in Python?

The best way to generate tests for uncovered lines is using a tool that proposes high-impact tests for critical code paths. This skill suggests tests and requires your explicit approval before implementing them.

Does this test coverage analysis work with any Python project?

This test coverage analysis is specifically designed for the OpenAI Agents Python repository. It executes coverage tools tailored to that environment to ensure code robustness within that codebase.

How do I ensure new features are fully covered by regression testing?

To ensure new features are fully covered by regression testing, run a coverage analysis after adding the feature. This identifies un-tested code paths and suggests relevant tests to fill gaps.

Can I automatically write new tests without manual review?

You cannot automatically write new tests without manual review using this skill. It employs a user approval workflow, requiring explicit consent before writing proposed tests for critical paths.