What is the Life Span of an Automated Test
Automated tests show up their value after the code changes. Except in case of rare types of tests, re-running a test before any code changes is a sheer waste of time, since it will not find any new bugs even after rerunning several times. However exceptions like timing and stress tests, can be analyzed in the similar way.
But a test will not last forever. At some point of time, the product will change in a way that it would break the test. This would call for either repairing the test or discarding it altogether. As per a reasonable approximation, repairing a test costs almost the same amount as discarding it & writing it from the scratch.
Whichever approach you may adopt, when the test breaks, & if by that time it has not repaid the automation effort, it would be better to discard it immediately in favor of a manual test.
Typically the useful life span of a test can be described as:
Hence prior to taking a decision in favor of automating a test, you must be able to make
an estimate as to how many code changes the test is likely to survive. If the answer is “not many”, the test is better for being good at finding bugs.