test-driven-development

Drives implementation through red-green-refactor cycles with failing tests written before production code.

113|17|Updated Oct 5, 2025
One-click install
npx skills add https://github.com/jaktestowac/awesome-copilot-for-testers --skill test-driven-development-jaktestowac
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/jaktestowac/awesome-copilot-for-testers/tree/main/plugins/test-driven-development/skills/test-driven-development
Command: npx skills add https://github.com/jaktestowac/awesome-copilot-for-testers --skill test-driven-development-jaktestowac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents implementation from landing before anyone knows how it will be verified, by enforcing a test-first workflow where every production change is preceded by a failing test that was actually run and observed. ## Core Features & Use Cases - Red-Green-Refactor Workflow: Guides each cycle from one failing test, to the minimal code that passes it, to cleanup under a green suite, with real test output quoted as evidence. - Bug Reproduction First: Fixes defects by writing a failing regression test that matches the reported symptom before touching the code, then keeps that test permanently. - Fit Check and Fallbacks: Decides when the loop does not apply (config, wiring, integration-only behavior) and names a substitute verification check instead of silently skipping testing. - Use Case: When asked to build a shipping cost calculator, it agrees the public interface and seam first, writes a failing test for an empty order, fakes the return value, then triangulates with more cases until the real pricing rules emerge. ## Quick Start Use test-driven development to build the new discount calculation feature, starting with a failing test for the simplest case.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I practice test-driven development on a new feature?▼

Start by agreeing the public interface and the seam the tests will observe, then list behaviors smallest-first. Write one failing test, watch it fail for the right reason, write the minimal code to pass, and refactor only while the suite is green.

How to fix a bug using test-driven development?▼

Reproduce the bug with a failing test at the correct seam before fixing anything, and confirm the failure matches the reported symptom. Minimise the reproduction, fix the code until it passes, and keep the test permanently as a regression guard.

Does test-driven development work with any test framework?▼

Yes, the workflow is framework-agnostic and does not assume a runner, assertion library, or mocking tool. It detects what the project already uses before the first cycle and asks which runner to target if nothing exists yet.

When should you not use test-driven development?▼

Skip the loop for pure renames, config and wiring with no independent source of truth, behavior provable only through real networks or browsers, and disposable exploratory spikes. In those cases name and run a substitute check such as a type check, smoke test, or manual reproduction instead.

Why does my TDD cycle keep failing to reach green?▼

Repeated failure to reach green means the step was too big. Revert to the last green commit, split the behavior into a smaller case that can pass in a few lines, and check whether the awkward test is pointing at an interface problem.