4 ms·
I have seen a few big bang 'lets test everything' go horribly wrong. Where you were unsure if the tests or the code were broken. Test code is code. It needs
by sumtechguy 5y ago
I have seen a few big bang 'lets test everything' go horribly wrong. Where you were unsure if the tests or the code were broken. Test code is code. It needs to be reviewed too. It is also dead easy to go too far with it (I know I have fallen into that trap more than once).
- quanticle 5y agoI would argue that the more pernicious result is tests that are correct and do pass at the moment they were written but are brittle, test internal interfaces and data, and generally ossify the design of the project because making any change now involves making the change and fixing the dozen tests the change breaks. It's hard to say no to those tests, because, on the surface they appear very thorough, and look brilliant on objective metrics, like branch/function coverage tools. It's only later, when every change, no matter how trivial, requires at least five or six files to be touched, that you come to realize the tarpit that you've ensnared yourself in.
- yoz-y 5y agoOn the other hand well written tests are awesome. When I have a pull request to review that makes change to a code I'm not familiar with, I always go to see the changes in tests first, to see what has actually changed on the interface level.