tdd-guide

Generate tests, analyze coverage reports, and guide red-green-refactor workflows across Jest, Pytest, JUnit, and Vitest.

2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill tdd-guide-bryanpinheiro77
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-guide
Source: https://github.com/BryanPinheiro77/FinanceBot-BackEnd/tree/main/.agents/skills/tdd-guide
Command: npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill tdd-guide-bryanpinheiro77

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Writing thorough tests and maintaining coverage targets is time-consuming, and teams often struggle to identify coverage gaps, generate realistic fixtures, or follow disciplined TDD cycles consistently across languages and frameworks. ## Core Features & Use Cases - Test Generation: Convert requirements, user stories, or source code into framework-specific test cases with happy paths, error cases, and boundary values for Jest, Pytest, JUnit, Vitest, and Mocha. - Coverage Analysis: Parse LCOV, JSON, and XML coverage reports to compute line, branch, and function coverage, then produce prioritized P0/P1/P2 gap recommendations against a target threshold. - TDD Workflow Guidance: Step-by-step red-green-refactor phase validation, plus fixture generation, test quality scoring, property-based testing patterns, and mutation testing guidance. - Use Case: Paste a Python function and ask for Pytest tests covering edge cases, then feed your lcov.info report to find which uncovered error-handling paths to test first to reach 80% coverage. ## Quick Start Ask the assistant to generate Pytest tests for a given source function, covering happy paths, error cases, and boundary values.

Frequently Asked Questions about tdd-guide

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

FAQPage Schema
How do I generate unit tests from source code automatically?▼

Provide the source code in TypeScript, JavaScript, Python, or Java along with the target framework such as Jest or Pytest. The test generator produces test stubs covering happy paths, error cases, and boundary values using arrange-act-assert structure.

How do I analyze a coverage report to find gaps?▼

Run your test suite with coverage enabled to produce an LCOV, JSON, or XML report, then pass it to the coverage analyzer. It calculates line, branch, and function coverage and returns prioritized P0, P1, and P2 recommendations against your target threshold.

Which testing frameworks are supported for test generation?▼

Supported frameworks include Jest 29+, Vitest 0.34+, Mocha, Pytest 7+, unittest, and JUnit 5. The framework adapter generates correct imports, assertion syntax, and setup hooks for each framework.

Does the coverage analyzer support JaCoCo and Cobertura XML reports?▼

Yes, the analyzer parses LCOV, Istanbul JSON, and XML formats including Cobertura and JaCoCo output. It can also auto-detect the report format from the raw content without explicit specification.

What are the limitations of generated tests?▼

Generated tests focus on unit-level scaffolding and require human review for complex logic, security-sensitive flows, and ambiguous requirements. Integration and end-to-end testing need separate tools like Playwright or Cypress.

When should I use property-based testing instead of example-based tests?▼

Use property-based testing with Hypothesis or fast-check when verifying invariants over large input spaces, such as serialization roundtrips, mathematical properties, or parser correctness. Example-based tests remain better for specific business rules and acceptance criteria.