4 ms·
A mature application without a test suite is basically unmaintainable by others, the difference is night and day. It’s almost malpractice to deliver software pr
by bluesnowmonkey 5y ago
A mature application without a test suite is basically unmaintainable by others, the difference is night and day. It’s almost malpractice to deliver software products without the tests and documentation necessary for clients to maintain them. Please write tests!
A lot of junior (and not so junior) engineers write bad tests. Each test is huge, with lots of irrelevant setup, and many assertions. It’s hard to tell which requirement is being verified, and it can break for lots of reasons. So they change code anywhere and lots of tests break and it’s not clear what’s going wrong. Yeah I can understand how people with that kind of experience come to believe tests are a waste of time.
When an application is tested from day one, it ends up designed for testability, and individual tests are succinct, often one liners. Testing feels easy and delivers a high ROI.
I think of testing as a fundamental skill, like learning good form in a sport like tennis. You can be self taught with bad form and do alright for a while. But pretty soon you’ll hit a skill ceiling and get left behind by those who got coaching and practiced their fundamentals.
- nsm 5y agoCompletely agree with you! "Growing Object-Oriented Software, Guided by Tests" by Freeman and Pryce is a great book to get started learning how to test well.
- pydry 5y agoBad tests are way worse than no tests. They demand maintenance, attention when they fail and give no confidence that the code is correct when they pass. Since most teams have an implicit testing time budget I find that teams which try to mollify useless unit tests that hold up CI tend to skimp on other less noisy forms of testing that work better. Good unit tests are still better than manual equivalents, obviously.