test-driven-development

Enforce RED-GREEN-REFACTOR cycles with real-system tests and no mocks.

2|Updated Sep 30, 2025
One-click install
npx skills add https://github.com/krzemienski/shannon-framework --skill test-driven-development-krzemienski
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/krzemienski/shannon-framework/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/krzemienski/shannon-framework --skill test-driven-development-krzemienski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A disciplined TDD approach that writes tests before production code using real systems, ensuring tests prove production behavior rather than mocks.

Core Features & Use Cases

  • RED-GREEN-REFACTOR cycle
  • NO MOCKS enforcement as a foundational rule
  • Real-system test setup that validates behavior end-to-end

Quick Start

Start a TDD cycle with NO MOCKS: /shannon:test-driven-development

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I write tests before code using real systems instead of mocks?▼

Test-driven development with real systems writes failing tests against actual dependencies before implementing code, then refactors after tests pass. This approach validates behavior end-to-end without mock abstractions, ensuring tests prove production correctness.

What is the RED-GREEN-REFACTOR cycle and how does it work?▼

The RED-GREEN-REFACTOR cycle writes a failing test (RED), implements minimal code to pass it (GREEN), then improves code quality without changing behavior (REFACTOR). This disciplined loop enforces test coverage and prevents over-engineering.

Why should I avoid mocks when writing tests?▼

Mocks decouple tests from real system behavior, allowing tests to pass while production code fails. Real-system testing catches integration issues, verifies actual dependencies work correctly, and ensures tests prove genuine functionality.

Can I use TDD with real systems for bug fixes and refactoring?▼

Yes, TDD with real systems applies to new features, bug fixes, refactoring, and behavior changes. Write tests that fail against the real system first, then implement or modify code in production-like environments to satisfy those tests.

How do I set up a TDD workflow that validates against real systems?▼

Start by creating test cases that interact with real systems and fail before implementation. Run the RED-GREEN-REFACTOR cycle in production-like environments, ensuring tests verify correct behavior against actual dependencies, not mocks.