java-regression-test-generator
Installation
SKILL.md
Java Regression Test Generator
Regression tests don't test correctness — they test stability. Run the code, record what it does, assert it keeps doing that. If behavior changes, a test fails, and you decide: bug or intentional?
When regression tests are the right tool
| Situation | Regression tests? |
|---|---|
| About to refactor legacy code with no tests | Yes — lock current behavior first |
| Behavior is the spec ("match the old system") | Yes — this is the spec |
| Code is known-buggy | Capture current behavior, but mark known-wrong assertions as "tracking, not endorsing" |
| Writing tests for new code | No — → unit-test-generator. New code needs correctness tests. |
Step 1 — Pick capture points
Public methods are obvious. Also capture at seams — places where the call graph narrows: