testing

Evaluate and improve test suites across C++, Python, Rust, and Java.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/tswr/engineering-mastery-plugin --skill testing-tswr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/tswr/engineering-mastery-plugin/tree/main/skills/testing
Command: npx skills add https://github.com/tswr/engineering-mastery-plugin --skill testing-tswr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the pervasive problem of low-value test suites that create an illusion of safety while slowing development, breaking on every internal refactor, and failing to catch real regressions. Many teams waste hours maintaining tests that provide zero protection, or skip writing tests entirely because they don't know how to write ones that last.

Core Features & Use Cases

  • Four Pillars of Valuable Tests: Evaluates every test against regression protection, refactoring resistance, fast feedback, and maintainability to ensure your test suite actually improves development velocity.
  • Behavior-First Testing Guidance: Teaches you to test observable public behavior instead of implementation details, so tests never break when you refactor code without changing its functionality.
  • End-to-End Testing Workflows: Covers the full testing lifecycle from TDD cycles for new code, to characterization tests for legacy untested code, to test review checklists for existing suites.
  • Language-Specific Idioms: Includes reference files for C++, Python, Rust, and Java with framework-specific patterns for test structure, mocking, dependency injection, and property-based testing.
  • Use Case Example: When you need to add test coverage to a 10-year-old legacy billing module with no existing tests, use this Skill to write characterization tests that lock in current behavior, then add targeted unit tests for new features without breaking on future refactors.

Quick Start

Use the testing skill to write a set of unit tests for the new user authentication feature that verify behavior through the public API and only mock external payment and email services.

Frequently Asked Questions about testing

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

FAQPage Schema
Why do my unit tests break every time I refactor code without changing its functionality?

Unit tests break during refactoring because they assert implementation details instead of observable behavior. Testing through the public API and avoiding mocks for internal dependencies ensures refactoring resistance and prevents false test failures.

How do I write characterization tests for legacy code with no existing test coverage?

Write characterization tests for legacy code by capturing and locking in its current observable behavior. This approach creates a safety net that detects regressions before you add targeted unit tests for new features.

When should I use mocks and test doubles in my test suite?

Use mocks and test doubles only for external unmanaged dependencies like payment or email services. Restricting mocks prevents brittle tests and ensures your test suite maintains high regression protection and maintainability.

Does this testing approach work for TDD workflows across C++, Python, Rust, and Java?

Yes, this testing approach supports TDD workflows across C++, Python, Rust, and Java by providing language-specific reference patterns for test structure, dependency injection, and property-based testing.

What are the four pillars of valuable tests for evaluating test suite quality?

The four pillars of valuable tests are regression protection, refactoring resistance, fast feedback, and maintainability. Evaluating tests against these criteria eliminates low-value suites that slow development velocity.

How do I review existing tests to ensure they actually catch regressions?

Review existing tests by enforcing behavior-focused testing and checking adherence to the four pillars of valuable tests. This eliminates brittle tests that fail to catch real regressions and slow development.