Testing Test Writing

Guide testing strategy for feature development with unit and integration tests.

Updated Oct 31, 2025
One-click install
npx skills add https://github.com/FlorianRiquelme/statamic-assets --skill testing-test-writing-florianriquelme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing Test Writing
Source: https://github.com/FlorianRiquelme/statamic-assets/tree/main/.claude/skills/testing-test-writing
Command: npx skills add https://github.com/FlorianRiquelme/statamic-assets --skill testing-test-writing-florianriquelme

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the creation of strategic tests that focus on critical user flows and behavior, avoiding over-testing implementation details and ensuring fast, valuable feedback during development.

Core Features & Use Cases

  • Behavior-Driven: Focuses on testing what the system does from a user's perspective, not how it does it internally.
  • Efficiency: Prioritizes core user flows, defers edge case testing until later, and ensures tests execute quickly.
  • Use Case: When developing a new user registration feature, this skill ensures tests cover the successful registration flow and common failure scenarios, without getting bogged down in every UI detail or internal implementation.

Quick Start

Write a test for the user registration flow, focusing on the happy path and a single invalid email scenario.

Frequently Asked Questions about Testing Test Writing

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

FAQPage Schema
How do I decide which tests to write for a new feature?

Prioritize tests for critical user flows and behavior over implementation details. Focus on the happy path and common failure scenarios first, deferring edge cases until later to balance testing velocity with development speed.

What's the difference between unit tests and integration tests?

Unit tests verify individual components in isolation, while integration tests validate how components work together. Choose unit tests for fast feedback on logic; use integration tests for critical user flows that span multiple components.

How do I write test names that are actually useful?

Use clear, descriptive test names that explain what behavior you're testing from the user's perspective, not implementation details. Name tests to reflect the outcome or scenario, making failures immediately understandable.

When should I use mocks for external dependencies?

Implement mocks to isolate the code under test from external systems, enabling fast execution and reliable results. Mock external dependencies in unit tests; use real integrations in integration tests for critical user flows.

Why does testing behavior matter more than testing implementation?

Testing behavior ensures your tests reflect what users actually need, remaining stable across refactoring. Implementation-focused tests break unnecessarily during rewrites, creating maintenance burden without protecting real value.

Where should I organize my tests in the project?

Locate tests under a tests/ directory with clear structure. Organize by feature or module so tests are discoverable, maintainable, and clearly separated from production code.