refine-tests
Refine Tests
Review all tests generated in the current session and eliminate low-value ones while strengthening the rest. The goal is a lean, high-confidence test suite — not maximum test count.
Step 1: Identify Tests from This Session
Look at the git diff or recent file changes to find all test files created or modified in this session. Read each one fully before making judgments.
Step 2: Prune Low-Value Tests
Remove tests that fall into these categories:
Trivial tests — Tests that only verify getters, setters, or basic constructors without exercising meaningful logic. If the test would pass even with a broken implementation, it's not testing anything useful.
Weak assertions — Tests whose assertions only check for non-null values, basic type existence, or that "no exception was thrown" without validating actual functional outcomes. A test that asserts $result !== null when the interesting question is what $result contains is wasting space.
Improbable edge cases — Tests for scenarios that don't impact core functionality or risk areas. Testing that a method handles a 10,000-character input when the UI caps it at 255 characters adds maintenance cost without meaningful protection.
Brittle implementation tests — Tests that are tightly coupled to internal details (exact method call counts, specific query structures, internal state). These break on every refactor and create false failures that erode trust in the test suite.