In the last post I mentioned that our automation team had been able to achieve in-Sprint automation. We achieved most of what I wanted, which was a huge step forward for this client. In this post I want to share some practical tips that will help you achieve an Agile Test Automation program.
Test Automation is a partnership – Developers and test developers need to work together to create testable code. By the time we reached our goal, the UI developers were creating the visual framework first with all object selectors in place and giving this to the test developer. This set of selectors was considered a contract, and was minimally dependent on the xpath. UI developers didn’t change those selectors without telling the test developer the what and the why. UI developers also minimized the impact on the automation developers where possible. The result was reduced churn in test development leading to faster, more reliable automated tests.
Test Automation is software development – Software developers have learned a lot over the years and test developers need to apply those lessons. Externalize configurations into files so tests can be moved from environment to environment. Put reusable components into libraries so a test bug can be fixed once to impact every test using that component. Create small modules to enhance readability and maintainability, especially since you can’t test your test until the developer completes the code. Use or create frameworks to simplify development. Make components as stand-alone as possible so test artifacts don’t create false errors. Finally, implement quality development behaviors such as code standards and peer reviews. The result is much higher quality tests that stand the test of time.
Automated Tests are a tool for developers – Make tests runnable in any environment so developers can use them for Test Driven Development. By the end of our project the developers were running the automated tests and helping the test developer resolve test issues before giving a build to QA. This helped the developer with a shorter feedback loop and all the debugging tools he or she needed to analyze a problem. The result was much higher quality software on first release to QA.
Be Agile in Test Development – All the agile values and principles work as well for test development as for software development. Create critical tests first and iterate to a more complete suite. Communicate with the software developer. Pick tools to allow fast failure and continuous integration. (We waited much too long to try to get our automation suite into the CI tool due to tool issues.) Focus on end user value. In the case of test automation that’s the developer who needs to use the test results to fix bugs. Keep things simple and focus on technical excellence. The result will be a better functioning team that truly values your contribution
If you’re a test developer, learn what these things mean and how to apply them to your tests. Other team members make sure these are applied in your test automation program. The results are well worth the effort.