According to Trigent Software’s own research a robust test automation framework ranks highly on their list of Software Testing ‘must-haves’. When executed in a structured manner, it helps improve the overall quality and reliability of a software. Read more from Test Architect Raghurikan in this fantastic guest blog…
Through our experience and research, ranking high on our list is a robust test automation framework. When executed in a structured manner, it helps improve the overall quality and reliability of a software.
The software development industry always faces a time crunch when it comes to the last mile, i.e. Testing. Ask any software developer and he will tell you that the development team in any corner of the world, wants 1. Testing activities to be faster than humanly possible, 2. Deliver results which are laser accurate and 3. All of these without compromising quality. Manual testing fails to live up to these expectations and therefore, are least preferred. Test Automation is therefore, the best choice as it helps accelerate testing and delivers fast results. To ensure that test automation works well, there is the need for a robust test frameworks which acts as the core foundation for the automation life cycle. If we don’t build the right framework, the results could be:
- Non-modularized tests
- Maintenance difficulties
- Inconsistent test results
All of which will result in escalating costs bringing down the ROI considerably.
The automation framework needs to be well organized to make it easier to understand and work with the framework. Organized framework provides an easier way to expand and maintain. Items to be considered are
- Easier way to manage resources, configurations, input test data, test cases and utility functions
- Provide support for adding new features
- Easy option to integrate with Automation tool, third part tools, databases etc…
- Have the standard scripting guidelines that needs to be followed to be across
Automation tests are used for long terms regression runs to reduce the testing turnaround time, hence, the design involved should be good so that the tests can be maintained easily and yield reliable tests results. Following are some of the good design step
- Separation of application locators from the test code so that the locators can be updated in the locator file independently on change. Example: To use locators from the object map, external excel or xml file
- Separate test data from the code and pull data from the external sources such as excel, text file, csv or xml file. Whenever required we can just update the data in the file
- Organize tests as modules/ functions, so that they are re-usable and easy to manage. Have application/ business logic in the separate class and call them from the test class
- Tests should start from the base state and ensure that it recovers and continues when there are intermittent test failures
The framework should provide option to choose the configurations at run time so that it can be used as per the test execution requirement. Some of the configurations include
- Ability to choose test execution environment such as QA, Staging or Production
- Ability to choose the browser
- Ability to choose the operating system, platform
- Ability to mark for priority dependency and groups for the tests
Libraries helps in grouping of the application utilities and hide the complex implementation logic from the external world. It helps in code reusability and easy to maintain code.
- Build the library of utilities, business logic, external connections
- Build the library of generic functions of the framework
Reports and logs
To evaluate the effectiveness of automation we need to right set of results, the automation framework should provide all the detailed required to test execution.
- Provide logs with necessary details of problem with the custom message
- Have reports which provides the detailed execution status with Pass/ Fail/ Skipped category along with the screenshots
Version Control and Continuous Integration
To effectively control the automation framework we need to keep track of it, hence the version control system is required to achieve this. Have the framework integrated with the version control.
Also we need to run the regression suite continuously to ensure that the tests are running fine and the application functionality is as expected, hence the continuous integration system is required to support for execution of the and results monitoring.
If we build the Robust Automation framework with the above capabilities, we gain the below benefits
- Increase product reliability – Accurate, efficient, automated regression tests – reduce risks
- Reduce the product release cycle time – Improve the time to market, Reduce QA cycle time
- Improve efficiency and effectiveness of QA – free QA team to focus manual efforts where needed