51Testing软件测试论坛

标题: When Should a Test Be Automated? 11 [打印本页]

作者: angelcc216    时间: 2006-1-10 12:42
标题: When Should a Test Be Automated? 11
Brian Marick

Testing Foundations
marick@testing.com


How Long Do Automated Tests Survive?

Automated tests produce their value after the code changes. Except for rare types of tests, rerunning a test before any code changes is a waste of time: it will find exactly the same bugs as before. (The exceptions, such as timing and stress tests, can be analyzed in the roughly same way. I omit them for simplicity.)

But a test will not last forever. At some point, the product will change in a way that breaks the test. The test will have to either be repaired or discarded. To a reasonable approximation, repairing a test costs as much as throwing it away and writing it from scratch3. Whichever you do when the test breaks, if it hasn’t repaid the automation effort by that point, you would have been better off leaving it as a manual test.




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2