Hacker News new | ask | show | jobs
by Ace17 3398 days ago
I've seen lots of unit tests tests trying to reproduce the exact circumstances of a known bug, in an attempt to trigger it, and thus prevent regressions.

The problem is, legitimate changes to your production code can make your test go blind. What I mean is that the test looses its ability to trigger the bug, while the potential for the bug to be re-introduced is still high.

This is what happens if you're trying to trigger known bugs instead of asserting behaviours: your tests might stop playing their role and you won't even notice.