test-generator

Generate unit, integration, and edge-case tests before implementation.

1|Updated Aug 10, 2024
One-click install
npx skills add https://github.com/takumi12311123/dotfiles --skill test-generator-takumi12311123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-generator
Source: https://github.com/takumi12311123/dotfiles/tree/main/.claude/skills/test-generator
Command: npx skills add https://github.com/takumi12311123/dotfiles --skill test-generator-takumi12311123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the generation of comprehensive tests before implementation to enforce Test-Driven Development and prevent missing coverage.

Core Features & Use Cases

  • TDD-compliant test generation: produces unit, integration, and edge-case tests that fail initially to drive implementation.
  • Fixture & mock scaffolding: creates reusable fixtures and mock setups for multiple languages.
  • Language-agnostic templates: provides ready-to-use test templates in common languages and testing frameworks.

Quick Start

Request test generation for the target feature and follow the Red-Green-Refactor cycle before implementing.

Frequently Asked Questions about test-generator

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

FAQPage Schema
How do I generate unit and integration tests before coding to enforce TDD?

To enforce TDD, you can generate unit, integration, and edge-case tests before implementation by analyzing the target code. This produces ready-to-run tests that initially fail, driving development through the Red-Green-Refactor cycle.

What is the best way to automate edge-case test creation for new features?

Automating edge-case test creation involves analyzing target code to produce comprehensive test templates that cover unusual scenarios. This ensures test coverage and detects regressions when starting a new feature or bug fix.

Does this test generation approach provide mocking and fixture scaffolding for multiple languages?

Yes, this test generation approach provides language-agnostic templates and creates reusable fixtures and mock setups. It outputs ready-to-run code for common languages and testing frameworks to support your workflow.

Can I use generated tests during code reviews and in CI pipelines?

Yes, you can use generated tests during code reviews and in CI pipelines. The generated tests ensure test coverage and detect regressions by providing ready-to-run code plus guidelines for running and expanding tests.

How do I start writing tests that fail initially to drive my implementation?

You start by requesting test generation for your target feature to produce tests that fail initially. Following the Red-Green-Refactor cycle, you implement code until the tests pass, ensuring true TDD compliance.

Why generate tests before implementation instead of writing them after?

Generating tests before implementation enforces Test-Driven Development and prevents missing coverage. It produces failing tests upfront that drive feature design, catching regressions early rather than validating existing code logic afterward.