Re:The Epic Fail of Enforcing Unit Tests
by Ace17 on Wednesday March 01, 2017 @01:33AM
(#13761727)
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.
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.