test-driven-development

Guide teams through Red-Green-Refactor cycles for features, bug fixes, and refactors.

1|Updated Dec 25, 2017
One-click install
npx skills add https://github.com/mattniedelman/dotfiles --skill test-driven-development-mattniedelman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mattniedelman/dotfiles/tree/main/dot_augment/skills/test-driven-development
Command: npx skills add https://github.com/mattniedelman/dotfiles --skill test-driven-development-mattniedelman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces Test-Driven Development by guiding teams to write failing tests before implementing code.

Core Features & Use Cases

  • Red-Green-Refactor workflows: define and follow a disciplined cycle of writing a failing test, making it pass, then refactoring.
  • Universal applicability: suitable for features, bug fixes, and refactors across software projects.
  • Quality assurance discipline: promotes exposing behavior through tests before coding to reduce regressions.

Quick Start

Create a failing test that describes the desired feature, then implement the minimal code to make the test pass, and finally refactor for readability without changing behavior.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the red-green-refactor cycle work?

Test-driven development (TDD) is a software engineering method where you write a failing test first, implement minimal code to pass it, then refactor without changing behavior. This cycle is called red-green-refactor.

How do I start writing failing tests before implementing code for a new feature?

To start test-driven development, create a failing test that describes your desired feature, implement the minimal code required to make that test pass, and finally refactor the code for readability without changing its behavior.

Can I apply test-driven development to bug fixes and refactoring tasks?

Yes, test-driven development applies universally across software projects during feature work, bug fixes, and refactors. It enforces exposing expected behavior through failing tests before modifying or adding any code.

Why should I write tests first instead of adding them after coding?

Writing tests first enforces test-driven development discipline, ensuring you define expected behavior before implementation. This reduces regressions and promotes quality assurance by exposing behavior through tests before coding.

Do I need specific testing frameworks to follow the test-driven development workflow?

No specific testing frameworks are required. Test-driven development is a universal software engineering discipline applicable across projects, focusing on the red-green-refactor workflow rather than mandating specific tools or dependencies.