20 Bad Excuses For Not Writing Unit Tests
I guess we always find excuses to keep on with our bad habits, don’t we? Stephen King
- I don’t have the time. But you’ll have the time to fix the bugs …
- I don’t know how to write tests. No problem, anyone can learn.
- I’m sure the code is working now. The competent programmer is fully aware of the limited size of his own skull …
- This code is not testable. Learn or refactor.
- It’s UI (works with DB as well) code, we don’t test it. Because it never crashes?
- Because I need to refactor first … and I need tests to refactor! Damn, you’ve fallen into the test deadlock!
- It’s multithreaded code, it’s impossible to test. Because it’s fully tederministic?
- The QA department is already testing the code. Is that working well?
- I should not test my own code, I’ll be biased. Start testing other people’s code right now then!
- I’m a programmer, not a tester. Professional programmers write tests.
- I’m using a REPL, it replaces unit tests. Sure, and you’re running your REPL buffers on the CI? and keeping your them for the next time someone modifies your code.
- My type system is strong enough to replace tests. Does it detect when you use ‘+’ instead of ‘*’?
- We don’t have the tooling to write unit tests. Get one.
- Tests aren’t run automatically anyway. Install a Continuous Integration Server.
- I’m domain expert developer, writing tests is not my job. Creating bugs isn’t either!
- We’d rather switch to the Blub language first! You’re right, let’s do neither then!
- We don’t test legacy code. Specifically because it is legacy code.
- Adding tests for every production code we write is insane! As shipping untested code is unprofessional.
- I find more issues doing manual testing. Exploratory Testing is a valuable testing, even more so on top of automated tests.
- Because my teammates don’t run them. Time for a retrospective.
Leave a comment