1

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?

4

4 回答 4

3

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.

于 2008-12-27T01:48:38.897 回答
2

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

于 2008-12-27T01:26:29.690 回答
1

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.

于 2008-12-27T01:40:04.920 回答
0

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

于 2008-12-27T06:23:36.267 回答