In plain words
A regression test reproduces a bug that once happened, fails before the fix and passes after it, and stays in the suite so a later change can't bring the bug back unnoticed.
Where you see it
A team that signed up for Harbor's annual plan on 29 February 2024 was billed twice at renewal, in a year with no 29 February. The fix ships with a test named after the ticket that uses that exact date.
What goes wrong
- Fixing before reproducing
If the test never failed on the broken code, you don't know it captures the bug. Write it first, watch it fail, then fix.
- A test that misses the real input
A test with an ordinary date passes before and after the fix. Use the exact input from the bug report, here 29 February, or the test guards nothing.
- Deleting it later because it looks odd
Months on, someone sees a test about leap days and removes it as clutter. A comment with the ticket and one line on what went wrong keeps it where it belongs.
What to tell your agent
Quick check
Sign in to earn +10 XP for itThe agent fixes Harbor's double-billing bug and adds a test. You run the new test against the old code and it still passes. What does that mean?