test-standards

ms2sato's avatarfrom ms2sato

Testing best practices and anti-patterns. Use when writing tests, reviewing test quality, or understanding testing methodology for this project.

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill provides a comprehensive framework for software testing standards, focusing on best practices and the identification of common anti-patterns. It helps engineering teams improve code quality by enforcing principles such as test validity, comprehensive coverage, and maintainable methodology, ensuring that tests verify requirements rather than implementation details.

Use Cases

  • Writing New Tests: Use as a reference to ensure new unit and integration tests follow proper isolation, mocking, and setup/teardown procedures.
  • Code Reviews: Evaluate the quality of peer-submitted tests to identify and eliminate anti-patterns like logic duplication or testing private methods.
  • Coverage Optimization: Identify and fill gaps in testing suites, including edge cases, error scenarios, and critical boundary points between client and server.
  • Technical Onboarding: Provide new developers with a clear, standardized methodology for the project's testing expectations and maintainability goals.
nametest-standards
descriptionTesting best practices and anti-patterns. Use when writing tests, reviewing test quality, or understanding testing methodology for this project.

Test Standards

Refer to test-standards.md for detailed testing guidelines.

Key Principles

  1. Test Validity - Tests verify requirements, not implementation details
  2. Coverage - Happy path, edge cases, error scenarios, integration points
  3. Methodology - Appropriate mocking, test isolation, clean setup/teardown
  4. Maintainability - Readable tests, minimal duplication, clear test data

Anti-Patterns to Avoid

  • Logic duplication (re-implementing production logic in tests)
  • Module-level mocking (prefer fetch-level mocks)
  • Private method testing (test through public interface)
  • Boundary testing gaps (client-server, null vs undefined)
  • Form testing gaps (schema-only tests are insufficient)