tdd-workflow

Guide code creation through the RED-GREEN-REFACTOR cycle with AAA tests.

Updated Aug 30, 2024
One-click install
npx skills add https://github.com/jfrometa/esquizo --skill tdd-workflow-jfrometa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/jfrometa/esquizo/tree/main/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/jfrometa/esquizo --skill tdd-workflow-jfrometa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams adopt Test-Driven Development to reduce defects and improve code reliability by enforcing a structured RED-GREEN-REFACTOR cycle.

Core Features & Use Cases

  • Clear RED-GREEN-REFACTOR workflow to drive incremental design and avoid overengineering.
  • AAA testing pattern guidance (Arrange, Act, Assert) to keep tests focused and maintainable.
  • Scenarios include feature development, bug fixes, and refactoring while keeping tests green.

Quick Start

Begin by writing a failing test for the new feature, implement the simplest code to pass the test, and then refactor while maintaining green tests.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
What is the RED-GREEN-REFACTOR cycle in Test-Driven Development?

The AAA testing pattern structures tests into Arrange, Act, and Assert phases. This keeps tests focused and maintainable while driving code creation during feature development, bug fixes, and refactoring.

How do I start writing tests using TDD for a new feature?

To start TDD for a new feature, begin by writing a failing test, implement the simplest code required to make that test pass, and then refactor the implementation while keeping all tests green.

Can I use Test-Driven Development for both bug fixes and refactoring?

Yes, Test-Driven Development applies to bug fixes and refactoring across diverse programming stacks. It guides code creation and modification by enforcing the RED-GREEN-REFACTOR cycle to reduce defects and improve reliability.

What is the best way to structure tests for reliable software development?

The best way to structure tests for reliable software development is using the AAA pattern. Arrange, Act, Assert keeps tests focused and maintainable while driving incremental design and avoiding overengineering.

When should I not use the TDD workflow approach?

You should avoid the TDD workflow approach when overengineering is a risk and incremental design is not suitable. If your software project does not require strict defect reduction or maintainable test structures, standard development may be preferred.