testing-principles
Installation
SKILL.md
Language-Agnostic Testing Principles
Test-Driven Development (TDD)
The RED-GREEN-REFACTOR Cycle
Use this cycle for new or changed executable behavior and reproducible bug fixes. For a behavior-preserving refactor, first confirm existing tests pass or add passing characterization tests, then refactor and rerun the same regression evidence.
-
RED: Write a failing test first
- Write the test before implementation
- Ensure the test fails for the right reason
- Verify test can actually fail
-
GREEN: Write minimal code to pass
- Implement just enough to make the test pass
- Focus on making it work