views:

338

answers:

4

Assume I'm using an interpreted language to power a medium or large application, and that the application is tested by hand (no unit tests, not integration tests, etc). Support for said product will not be dropped any time in the foreseeable future, and new development happens daily.

Are there some situations in which it would not be beneficial to begin implementing an automated test suite of some sort?

+2  A: 

Any time you want to guarantee employment for a bunch of people doing error-prone hand testing.

Charlie Martin
+1  A: 

Automated testing is just one tool available for testing. It finds a specific class of defects. Doing only unit tests or only automated UI testing or only manual testing won't get you the best results.

Automated UI tests are great at catching regression. They are worth doing on any reasonably complex application that is under active maintenance.

Jim Blizard
Are you referring to something like Selenium for Automated UI test?
dmercer
+3  A: 

Situations where one should not implement automated unit testing:

  1. When the application is at the end of it's lifecycle and is about to be discarded
  2. When management treatens to sack you for devoting extra effort to testing
  3. When the existing system is so obfuscated and poorly designed that adding tests would only be practical if the software were scrapped and redone from scratch
  4. When doing so will make your possition redundant

Other than that I can't think of a single reason not to start adding unit tests. Unit tests can help make it easier to change and redesign your system. It should be a part of the daily work of a developer and not some optional extra.

mezoid
I'm afraid #3 may be the most applicable :-\
dmercer
I reject #3 as logically impossible. If the system does *anything*, it's testable with automated tools. However, what you often learn is that what little it does is unpredictable, which is a different from #3 as stated.
S.Lott
"Most applicable" !== spot on. the poor design in this case has led to some nightmerish coupling, and lots of 'things' that don't really do anything well. At any rate, The other bullets were good points. Cheers
dmercer
A: 

When automated testing would trigger events or leave behind data in the system that would interfere with its proper operation.

chaos