testing-patterns

Drive development with red-green-refactor cycles and descriptive test names.

3|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/vtgiang-dotcom/Solo-Code-Harness --skill testing-patterns-vtgiang-dotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/vtgiang-dotcom/Solo-Code-Harness/tree/main/.gemini/antigravity/skills/testing-patterns
Command: npx skills add https://github.com/vtgiang-dotcom/Solo-Code-Harness --skill testing-patterns-vtgiang-dotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prove code correctness by driving development with tests.

Core Features & Use Cases

  • Test-First Development: write failing tests before implementing code.
  • Prove-It Pattern: reproduce bugs with tests before fixes.
  • Red-Green-Refactor: cycle to ensure behavior remains correct after refactors.
  • Test Pyramid guidance: balance unit/integration/e2e tests for fast feedback.
  • Clear test design: descriptive test names and state-based assertions.

Quick Start

Write a failing test that reproduces the desired behavior, implement the minimal code to pass the test, and then refactor for readability.

Frequently Asked Questions about testing-patterns

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

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

Test-driven development begins by writing a failing test that reproduces the desired behavior, implementing the minimal code to pass it, and then refactoring for readability. This enforces a structured red-green-refactor workflow to ensure code correctness.

Can I reproduce a bug with unit tests before attempting a fix?

Yes, you can reproduce bugs with unit tests using the prove-it pattern. Write a failing test that replicates the exact bug behavior before changing any code, ensuring your subsequent bug fix is verified by the test turning green.

What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle is a test-driven development workflow where you write a failing test, implement minimal code to pass it, and then refactor the code. This cycle ensures behavior remains correct after refactoring while maintaining fast feedback.

How do I balance unit, integration, and end-to-end tests for fast feedback?

Apply test pyramid guidance to balance unit, integration, and end-to-end tests. This testing pattern prioritizes a larger base of fast unit tests over slower e2e tests, ensuring fast feedback and comprehensive quality assurance across your project.

Does test-driven development work for changes to existing code behavior?

Test-driven development works for new features, bug fixes, and changes to existing behavior across any project. It enforces clear test design with descriptive test names and state-based assertions to drive safe code modifications.