Automation Framework is a big buzz word in IT today, especially in the QA world and everyone wants to get on the bandwagon. There are many sources through which automation can be learned however, automation framework is an elusive concept for most people. There are resources who are experts in coding, finding it difficult to design an automation framework alone since they have limited knowledge on how to design a framework or not enough research has been done to understand how to design a framework. There are some common mistakes that automation framework designers do which makes the framework difficult to use and maintain.
Over the years, I have discovered that the art of designing an automation framework is not about getting help from others or getting some training, but its’ the past mistakes that I made which taught me how to avoid them. To make automation a success it is very important to have a good robust automation framework in place which will act as the core foundation for the automation life cycle. If the framework does not support all the requirements or is not constructed correctly then it might impact the automation ROI, maintenance and become very expensive. In order to create an effective automation framework, you should avoid rushing in and begin to write code. However, you should spend sufficient time to collect the requirements from every aspect.
Below are few points to keep in mind when designing an automation framework:
- Requirement gathering should be done before designing the framework from different aspects like stability, ease of use, extensibility, maintainability etc.
- Framework components should be properly segregated, organized and should have minimum or no dependencies
- The framework should be flexible enough to support various configurations like environments, browser, and devices etc.
- Coding standards should be followed and a guideline should be in place to have the best practices on how to write the code
- Data should be kept outside of the script in a excel spreadsheet or database so that even a manual tester can update the data if required
- Libraries should be divided in such way so that generic utilities and application functions are segregated
- Reuse of code should be encouraged by writing reusable functions/code which can also help with maintenance
- Frameworks should provide flexibility to execute selective test cases from a test suite
- Object management should be robust and done in such a way that it has less impact on maintenance
- Reports should have all the relevant information to reproduce a defect such as, step description, data used, actual and expected results of application in case of failure
- There should be a mechanism to maintain the result history of each execution so that you can compare the successive execution results and see the improvement in application quality
- The framework should be easy to set-up/configure on new machines