I submit that test automation can improve your project’s pace. I realize that some believe it helps detect defects or that it can be developed independently from project execution. I recommend you reconsider those positions.
Ever since I read Specification By Example, my understanding and attitude towards test automation has changed. It did not change how I design or build test automation, it changed how I see its purpose. For this post, I refer to test automation in a spectrum from evaluating newly checked in code to that used in regression testing.
I’ve been pitching what I believe is a familiar notion around test automation in testing circles. But it was suggested to me that I provide some context. Put simply:
The purpose of test automation is to enable frequent evaluation of application behavior in the face of change.
I did not arrive at this conclusion by myself. Adzic’s book was a great catalyst to think about test automation more, and to discuss it with other test engineers. A context took shape for me and its present form is my declaration above.
Defect Detection is a Narrow Focus
Test automation costs too much to make it beneficial in just detecting defects in the short term. Indeed, test automation developers find defects many times when they are developing (not executing) the automation. That means that by the time the test automation is completed and verified, it’s possible someone else could have located that defect AND corrected it.
I recommend you invest in your test automation today. You will realize the real value when it detects a defect in a succeeding iteration, or a succeeding project. When it does, it demonstrates how recent changes have introduced errors in existing behavior. In that manner, it is acting to preserve your business intent.
Independent Development Costs More
Let’s say you wait to develop test automation. At some point in the future (the next iteration or the next project), the testing team is discovering defects in code that was completed AND working. The current pace begins to slow:
- Defects in existing code must be corrected so testing can evaluate the newly deployed code.
- There is a good chance that correcting defects will introduce more defects.
- When the code is operating again, you may find defects in the newly deployed code.
If there was an investment in test automation, frequent execution would detect changes to existing functionality at the time they were introduced. That is, defects would be detected when developers execute the test automation, and they would correct them. This saves time because the project team continues building products rather than fixing products; the project maintains its pace.
Your Investment Pays You Back
Test automation pays dividends in protecting your investments in building and expanding business functionality, and detecting unintentional changes to business behavior early.
- Time is saved because the team executes test automation often to detect behavior changes early – before the products are deployed for testing.
- System and integrated testing is more effective because simple defects are corrected before deployment for testing.
Lastly, the project team builds confidence in their products because the testing team can spend more time exploring products broadly, deeply, and for risk.