tdd

Guide developers through test-driven development with red-green-refactor cycles.

Updated Aug 26, 2024
One-click install
npx skills add https://github.com/FabienDehopre/my-netatmo-24 --skill tdd-fabiendehopre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/FabienDehopre/my-netatmo-24/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/FabienDehopre/my-netatmo-24 --skill tdd-fabiendehopre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers avoid fragile implementations by guiding them to build features and fix bugs through behavior-focused, test-driven development.

Core Features & Use Cases

  • Test-First Workflow: Guides red-green-refactor cycles using incremental vertical slices instead of writing large batches of tests before implementation.
  • Behavior-Focused Testing: Promotes public interface testing, integration-style tests, and resilient specifications that survive internal refactors.
  • Use Case: Use this Skill when adding a new feature, fixing a bug, or designing integration tests where reliable behavior verification is required.

Quick Start

Use the tdd skill to plan and implement this feature using a test-first red-green-refactor workflow.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for a new feature?

Test-driven development for a new feature is implemented through red-green-refactor cycles using incremental vertical slices. You write a failing test, implement code to pass it, and then refactor, ensuring behavior-focused automated tests validate software changes.

Does test-driven development work for fixing bugs and integration testing?

Yes, test-driven development works for bug fixes and integration testing by requiring public interface testing and incremental red-green-refactor cycles. It guides you to build and validate software changes through behavior-focused automated tests.

What is behavior-focused testing in software development?

Behavior-focused testing in software development promotes public interface testing and integration-style tests. It creates resilient specifications that survive internal refactors, guiding developers to verify reliable behavior rather than testing internal implementation details.

How do I use mocking when refactoring code in a test-first workflow?

Mocking in a test-first workflow requires careful guidance during the refactoring phase of red-green-refactor cycles. It isolates public interface testing and integration tests, ensuring resilient specifications survive internal refactors while validating software changes.

When should I avoid writing large batches of tests before implementation?

You should avoid writing large batches of tests before implementation when practicing test-driven development. Instead, use incremental vertical slices in red-green-refactor cycles to guide feature development and ensure behavior-focused automated tests validate changes.