test-driven-development

Guide teams in applying TDD and BDD with a double-loop workflow.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/dljsjr/sandpiper-ai --skill test-driven-development-dljsjr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/dljsjr/sandpiper-ai/tree/main/skills/sandpiper/test-driven-development
Command: npx skills add https://github.com/dljsjr/sandpiper-ai --skill test-driven-development-dljsjr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide clarifies how to apply test-driven development and behavior-driven development to software projects, helping teams adopt a robust, test-first discipline and reduce regression risk.

Core Features & Use Cases

  • Provides a practical framework for applying TDD and BDD across small to large projects.
  • Defines the Red-Green-Refactor cycle, test naming conventions, and the effective use of test doubles.
  • Offers guidance on avoiding common pitfalls and aligning testing practices with stakeholder goals.

Quick Start

Outline a simple feature, write a failing test, implement the minimal code to pass, and refactor.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the difference between TDD and BDD?

TDD focuses on writing failing unit tests first to drive code implementation, while BDD aligns testing with stakeholder goals using behavior-driven scenarios. This guide clarifies when to use each and how to implement a combined double-loop workflow.

How do I implement the Red-Green-Refactor cycle for unit testing?

To implement the Red-Green-Refactor cycle, outline a feature, write a failing test, implement minimal code to pass the test, and then refactor. This framework enforces test-first discipline and reduces regression risk.

When should I use test doubles in test-driven development?

Test doubles are used in test-driven development to isolate the code under test by replacing dependencies. This guide provides best practices for their effective use and helps avoid common pitfalls during the refactoring phase.

What are common mistakes when applying behavior-driven development?

Common behavior-driven development mistakes include poor test naming and misaligning testing practices with stakeholder goals. This guide helps teams avoid these errors by enforcing strict test naming conventions and clarifying BDD usage.

Can I use test-driven development for large software projects?

Yes, this guide provides a practical framework for applying test-driven development and behavior-driven development across both small and large software projects, ensuring a robust test-first discipline.

Why does my test-driven development workflow lack structure?

Your test-driven development workflow lacks structure without a defined double-loop process. Applying a strict Red-Green-Refactor cycle with clear test naming conventions establishes a robust, test-first discipline.