Lack of sustainability is the number-one reason for test automation debacles across the industry. Everything looks so rosy when you start-off on automation journey. However, a year from it’s implementation the value is not clear. Many teams just get pulled into the vicious cycle of automation maintenance, never deriving any real benefit. You are always in the catch-up mode to keep up your existing scripts intact. End objective gets lost in the noise!
Here are some real-world tips to consider for achieving a sustainable automation
1. Keep test scripts simple: There is enough complexity in the application-under-test. Lot of times it feels technically fulfilling to over-optimize scripts and complicate test scenario coding. It is ok to break down the scripts to achieve one simple task at a time. If multiple data variations for the same use case navigate the application through different paths, they may be considered for separate scenarios. Use cases that may seem somewhat related, might take their own course as the application goes through changes. Rather than inserting a whole lot of logic based statements, consider simplifying.
2. Do not jump on the record/playback wagon: Design should never be an after-thought. “Quick” results from record/playback are misleading. Understand the big picture. Abstract out various entities in the test system. Consider parameterization options and modularize the test setup. Time spent on design is worth more than you can imagine.
3. Be smart with element identification: Element Identification should not be treated as a miscellaneous activity. It is as important as coding you do for automation. Consider various best practices and ensure scripts are reasonably resilient to application changes.
4. Synchronization is central: One of the most common reasons for automation test failures is the lack of proper synchronization. Inserting a lot of hardcoded wait statements is not a solution. As much as possible, make use of implicit waits and synchronize on important elements in your application before any significant action.
5. You don’t have to automate everything: Once again, the core objective of automation should be to address fairly repeatable sequence of steps in a reliable fashion. Avoid automating corner cases that require disproportionate effort; leave it for manual testing. It is a dis-service to keep running after automation %.
6. Say NO to Custom frameworks: Peripheral concern should never be a concern of automation coding. Focus on the business logic in the test scenario. Choose a tool that complements your efforts to address framework requirements. Many teams end up spending large amounts of effort managing custom frameworks that have nothing to do with the business objective
accelQ is a cloud based continuous testing platform for functional and API testing needs. With its natural language based interface for test development, accelQ is built for real world challenges in test automation. Best Practices are embedded at every stage of the process and script resilience is ensured with autonomics based self-healing techniques. Sign up for a free trial and learn more about how accelQ can complement your efforts in building a sustainable automation suite. Remember it is not about initial success, but the long-term sustainability.