Receber por email
← Voltar para o catálogo

test-driven-development

Use ao implementar qualquer funcionalidade ou correção de bug, antes de escrever o código de implementação. Garante o ciclo RED-GREEN-REFACTOR.

1.4kestrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add a5c-ai/babysitter

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/test-driven-development-mpsi1ecw/svg)](https://www.skillteca.com.br/skills/test-driven-development-mpsi1ecw)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Test-Driven Development (TDD)

Overview

Write the test first. Watch it fail. Write minimal code to pass.

Core principle: If you did not watch the test fail, you do not know if it tests the right thing.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over. No exceptions.

RED-GREEN-REFACTOR

  1. RED - Write one failing test showing desired behavior
  2. Verify RED - Run test, confirm it fails for the right reason
  3. GREEN - Write simplest code to pass (YAGNI)
  4. Verify GREEN - Run test + full suite, all must pass
  5. REFACTOR - Clean up while keeping tests green
  6. COMMIT - Frequent small commits

Red Flags (STOP and Start Over)

  • Code before test
  • Test passes immediately
  • "I'll test after"
  • "Too simple to test"
  • Rationalizing "just this once"

Agents Used

  • Process agents defined in test-driven-development.js

Tool Use

Invoke via babysitter process: methodologies/superpowers/test-driven-development

Compartilhar X LinkedIn