test-strategy-reviewer

Reviews whether test strategy matches the problem class of the code under test.

Updated Nov 19, 2020
One-click install
npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill test-strategy-reviewer-kwojtasinski-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-strategy-reviewer
Source: https://github.com/kwojtasinski-repo/ECommerceApp/tree/main/.github/skills/test-strategy-reviewer
Command: npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill test-strategy-reviewer-kwojtasinski-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often write tests at the wrong level or with the wrong style for the code being tested, such as mocking pure transformations or asserting interactions on stateful objects. This Skill reviews whether the testing strategy fits the problem class of the production code and reports concrete mismatches. ## Core Features & Use Cases - Problem class classification: Classifies each tested behavior as Transformation, Stateful Object, or Integration, with a mandatory user confirmation gate before any recommendation. - Strategy comparison: Identifies the current test strategy (output-based, state-based, or interaction-based) and compares it against the recommended strategy for the confirmed problem class. - Structured mismatch report: Produces a per-test-class report with problem class, current strategy, recommended strategy, and an OK or MISMATCH verdict with concrete change guidance. - Use Case: Point the Skill at a test file for an order checkout service; it reads both the test and production code, classifies the orchestration as Integration, and flags that mocking the managed database should be replaced with a real instance and state verification. ## Quick Start Ask the assistant to review the test strategy for a specific test file or directory, providing the path to the tests you want evaluated.

Frequently Asked Questions about test-strategy-reviewer

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

FAQPage Schema
How do I know if my tests are at the right level?

Classify the production code first as Transformation, Stateful Object, or Integration, then check whether the test strategy matches. Transformations need output-based tests, stateful objects need state verification, and integrations need interaction-based tests at system edges.

When should I use mocks in unit tests?

Mocks are appropriate only for unmanaged dependencies at the system edge in integration code. Mocking pure transformation steps or internal parts of a stateful object is a smell unless the step is expensive or has side effects.

Should I mock the database in integration tests?

No, do not mock a managed database when a real instance is available in the test scope. Use a real database and verify the final state; reserve mocks for unmanaged external dependencies at the system boundary.

What is the difference between output-based and state-based testing?

Output-based testing calls the code and asserts on the returned value, suiting transformations. State-based testing puts an object into a prior state and verifies resulting state through getters, events, or queries, suiting stateful objects.

When should I test at the aggregate level versus the service level?

Keep aggregate-level tests when invariants are complex or orchestration churn is high. Use facade or service-level tests only when orchestration is simple and stable and outcomes are visible through a read model or query.