4 ms·
Automated testing is neither good nor evil, it is a tool like many others which has certain advantages and certain shortcomings and disadvantages. Unfortunately
by InclinedPlane 15y ago
Automated testing is neither good nor evil, it is a tool like many others which has certain advantages and certain shortcomings and disadvantages. Unfortunately, we've been living in an era where, frankly, uneducated heathens dominated the industry with their beliefs that automated tests were not worth the effort.
Finally we've started to move beyond that. But unfortunately we've ended up more or less lurching into a general mindset of unfettered adulation for testing. On balance that's probably better than the unwashed heathenism of earlier but it's still a dangerous situation to be in. Automated tests have their own pitfalls. Test code is often lower quality than regular code, for example, requiring special care to keep it up to par. Also, it's all too easy to write passing tests which hinder rather than enhance your ability to modify the code base (which, by the way, is the primary reason to have automated tests in the first place).
The proper way to approach testing is openly and directly, by having an honest debate on the level of testing necessary, the cost of testing, and the processes necessary to ensure that tests are high quality and providing value. Sometimes this can result in a decision to not test some aspects of a product. And that's ok as long as that decision is made rationally.
More so, as Fowler says, automated testing is just one tool for increasing the quality of a product, but in many ways it is not the most effective one. Formal code reviews and beta testing, for example, have shown to be some of the most effective techniques for finding defects. Additionally, they are capable of finding defects that testing cannot: defects at the level of design.