As a developer, I want to write cool code to solve interesting, real-world problems. I don't want to be "smart" and write "smart tests" that are inscrutable, rather than spending time on writing more (feature) code.
Here an article that summarizes my experience. Namely, mocks are evil, and tests should be dumb. If tests are complex enough to require their own framework, it means you need to take a close look at where you're spending your rare brainpower: on features, or unit tests?
No company ever was able to take over a market and satisfy customers by having more/better unit tests.
- A decade of unit testing (Karl Seguin): have super-focused unit tests that focus on calculation, not interaction with other functions; integration tests are a must; ignore code coverage [!]; more logging is better than having more tests.
No comments:
Post a Comment