DEV Community

Discussion on: Why do great developers love writing tests?

Collapse
 
epogrebnyak profile image
Evgeny Pogrebnyak

My selling point for tests is refacting. If you cannot tests something easily (eg your setup/fixtures grow too big, you are inclined to use mocks and generally testing is problematic) - you have bad code, or worse some bad design/architecture decisions, the tests reveal that.Important and more rare skill is knowing what to test, and achiving meaningful coverage with fewer tests. The tests are never complete, cannot tests everything and under all coditions,it is becoming very exensive, so picking the risky parts of code for tests is super important.