48

There are a number of questions on this site that give plenty of information about the benefits that can be gained from automated testing. But I didn't see anything that represented the other side of the coin: what are the disadvantages? Everything in life is a tradeoff and there are no silver bullets, so surely there must be some valid reasons not to do automated testing. What are they?

Here's a few that I've come up with:

  • Requires more initial developer time for a given feature
  • Requires a higher skill level of team members
  • Increase tooling needs (test runners, frameworks, etc.)
  • Complex analysis required when a failed test in encountered - is this test obsolete due to my change or is it telling me I made a mistake?

Edit
I should say that I am a huge proponent of automated testing, and I'm not looking to be convinced to do it. I'm looking to understand what the disadvantages are so when I go to my company to make a case for it I don't look like I'm throwing around the next imaginary silver bullet.

Also, I'm explicity not looking for someone to dispute my examples above. I am taking as true that there must be some disadvantages (everything has trade-offs) and I want to understand what those are.

RationalGeek
  • 10,077
  • 18
    "Complex analysis required..." the test isn't the cause of the failure, it's an indicator. Saying having no tests means no complex failure analysis required is no better than sticking your head in the mud. – P.Brian.Mackey Oct 27 '11 at 13:04
  • 1
  • longer build times when tests are run every build, and repeated code when the tests are on the very low level (testing getters and setters)
  • – ratchet freak Oct 27 '11 at 13:07
  • 2
  • if a developer is using time to test new features the risk of them failing has decreased meaning your product is more stable. 2. Educating your team members for a test-focus approach is a good thing, they can use this knowledge for other things in work (and life). 3. Create an automated installation for the test environment 4. This tells me that 1 test does too much.
  • – CS01 Oct 27 '11 at 13:13
  • 2
    If the same developer is coding the tests as is coding the actual code, then they will only think of the same test cases to write tests for as the ones they thought about when they were coding. – Paul Tomblin Apr 06 '12 at 17:39
  • I just posted an answer to the related question and feel like I must at least comment on this one. IMO, almost all the disadvantages mentioned here (and in replies) look false and misleading if we talk about the real live project and not about something you code quickly and forget. I am afraid that question like this may be used as an excuse to develop without automatic tests and in many cases this will lead to the death of the project or a complete rewire. – Borys Serebrov Jan 29 '16 at 15:39