Unit testing, like Scrum, feels sometimes a bit counter intuitive. Even if my more knowledgeable colleagues tell me over and over again the importance of test driven development, I tend to code first and test (maybe) later. But I’m learning with every bug I encounter
Yesterday I watched this Channel9 presentation from Tech·Ed North America 2010 by Benjamin Day on the subject of Unit Testing, and the mistakes we make. Benjamin is an inspiring speaker and hits it right home. The ten biggest mistakes in Unit Testing from his point of view:
- Forgetting red-to-green
- Poor naming conventions
- Unclear purpose
- Code organisation
- Unit vs. integration test confusion
- No code coverage on exceptions
- Giving up on the user interface
- Fixing bugs without unit tests
- Useless code coverage
- Stop mocking me!
All these point are covered with real world examples, code and lots of humor. I learned a lot. A highly recommended watch.
