3 ms·
I share the distaste for "holier than thou" proponents of testing. However I have to take issue with the following: Test code is easy to write * It does
by jsankey 17y ago
I share the distaste for "holier than thou" proponents of testing. However I have to take issue with the following:
Test code is easy to write
* It doesn't have to be clean
* It doesn't have to be readable
* It doesn't have to be robust
This is really bad advice. Tests still need to be maintained, so they should be clean and readable like any of your code. Readable tests can also be invaluable for understanding the module they are testing (especially those tricky parts where bugs once lurked). I learned this the hard way myself, and worry that this attitude leads people to wasting a lot of time on test maintenance and eventually giving up on testing.
- jbert 17y agoThe main thrust of the presentation is to lower the bar in people's minds to writing test code. Giving people 'permission' to write sloppy test code makes them more likely to write it. In the context of selling people on writing tests, it is defensible advice. For people who have a lot of tests, then yes, raising the standard for your test code might make sense.