20 Bad Excuses For Not Writing Unit Tests

1 minute read

I guess we always find excuses to keep on with our bad habits, don’t we? Stephen King

  1. I don’t have the time. But you’ll have the time to fix the bugs …
  2. I don’t know how to write tests. No problem, anyone can learn.
  3. I’m sure the code is working now. The competent programmer is fully aware of the limited size of his own skull …
  4. This code is not testable. Learn or refactor.
  5. It’s UI (works with DB as well) code, we don’t test it. Because it never crashes?
  6. Because I need to refactor first … and I need tests to refactor! Damn, you’ve fallen into the test deadlock!
  7. It’s multithreaded code, it’s impossible to test. Because it’s fully tederministic?
  8. The QA department is already testing the code. Is that working well?
  9. I should not test my own code, I’ll be biased. Start testing other people’s code right now then!
  10. I’m a programmer, not a tester. Professional programmers write tests.
A quote 'Be Stronger Than Your Excuses'
From todayiwillbefit.com
  1. 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.
  2. My type system is strong enough to replace tests. Does it detect when you use ‘+’ instead of ‘*’?
  3. We don’t have the tooling to write unit tests. Get one.
  4. Tests aren’t run automatically anyway. Install a Continuous Integration Server.
  5. I’m domain expert developer, writing tests is not my job. Creating bugs isn’t either!
  6. We’d rather switch to the Blub language first! You’re right, let’s do neither then!
  7. We don’t test legacy code. Specifically because it is legacy code.
  8. Adding tests for every production code we write is insane! As shipping untested code is unprofessional.
  9. I find more issues doing manual testing. Exploratory Testing is a valuable testing, even more so on top of automated tests.
  10. Because my teammates don’t run them. Time for a retrospective.

'Just Do It' written on a board

I usually write about 15 minutes worth of reading per month. I won't transfer your email. No Spam, unsubscribe whenever you want.

As a gift for subscribing, you'll receive an illustrated mini-ebook "How to start a team coding dojo"!

Leave a comment