Repository navigation
Open
Description
SJM's test suite looks like it may contain a lot of redundant test code and overlapping test classes. Repeated setup, assertions and fixture data add maintenance work and can make it harder to see which scenarios are actually distinct.
Investigate whether we can maintain exactly the same coverage with substantially less test code and fewer classes, then use the findings to consolidate and modernize the suite.
Areas to investigate
- Duplicate and near-duplicate tests across modules, repeated setup and teardown, assertion blocks, helpers and test data.
- Opportunities to replace repeated cases with clearly named parameterized tests, focused shared helpers or reusable fixtures.
- Older test styles and patterns that could be simplified using the project's supported Java version and test tooling.
- Outdated, oversized or redundant test data that could be refreshed, minimized or consolidated. Preserve historical, malformed and unusual samples wherever their exact contents are essential to a regression.
- Overlapping test classes that could be merged while keeping unit and integration responsibilities, module boundaries and failure reporting clear.
Expected outcome
- Start with an inventory and a prioritized consolidation proposal that distinguishes true duplication from intentionally separate coverage.
- Map every proposed removal or merge to the surviving scenarios and assertions, including edge cases, negative paths and past regressions.
- Try a representative area first, then apply useful patterns incrementally. Assess how much test source, class and fixture duplication can realistically be removed.
- Preserve the existing behavioral, line and branch coverage across the same modules and supported configurations. Matching coverage percentages alone is insufficient if a distinct scenario or meaningful assertion disappears.
- Keep the resulting tests readable and failures easy to diagnose. Reducing code or class counts must not depend on weaker assertions, disabled cases or abstractions that make the suite harder to maintain.
The goal is a substantially smaller, clearer and more current test suite with the same protection against regressions.
Activity