3 ms·
Unit tests, exhaustive regression tests, and automated tests are the best way to prevent regressions. Time spent writing good unit tests today allows you to ma
by gwbas1c 2y ago
Unit tests, exhaustive regression tests, and automated tests are the best way to prevent regressions.
Time spent writing good unit tests today allows you to make riskier changes tomorrow; good unit tests de-risk refactors.
- notyourwork 2y agoUnit tests cover the single functionality but ignore the system as a whole. Most regressions I've seen in industry are because of a lack of understanding how the system components interact with one another. Therefore, I see unit tests as one pillar but also suspect that without good quality integration or end-to-end testing you won't be able to realize the riskier re-factors you describe. Perhaps you consider these part of your regression testing and if so, I agree.
- magicalhippo 2y agoThe way I like to view it is that Lego bricks might pass unit tests aka QC with zero issue, but you can still easily build an unreliable mess with them.
- grumpy_coder 2y agoI see an over-reliance on automated tests recently. Often suggesting just passing the CI tests is enough to approve a change. In ancient code it's just as important to limit the blast radius of your changes, and have a good reason for making them. Not changing something is the ultimate way to prevent a regression.