In past few years I have designed and developed Test Automation Framework for several of our customers. At times there have been customers and testers who wanted me to just have Record and Play (R&P) kind of automation and I had hard time convincing them for TAF. They did agree to my advice of having TAF over R&P only after few months down the line of getting test automation introduced and realizing the cost of maintenance taking over new script development and existing automation execution.
This post describes in details why Test Automation Framework (TAF) is essential for better returns on investment (ROI) over bunch of standard record and play scripts.
R&P
R&P has limitations and may not always work. Let me explain how R&P will fail. In R&P you simply record the scripts and play them when you want to test your application after every bug fix or addition of new functionality over a period of time. Your application will have several forms where user need to provide information. Based on these user inputs your application will provide unique identities to inputs and also there will be change of states of several objects in your application. Now every time you execute these recorded scripts you will not get same unique identities and your verification for recorded objects relying on recorded identities will fail the verification causing automated scripts to fail and build being marked as failed build.
TAF helps in taking care of such objects and their obsolete states. It will ensure that every time you execute the automated script correct test data goes into your application and the application output provides the correct results. Any failed test script should provide valid application failure. TAF also assists in ensuring the consistency and accuracy of the application is well maintained.
How TAF looks like ?
TAF consists of automation driver, test scripts, test data, application configuration data, test results/report and automation tool. They work hand in hand in smooth execution of test scripts, creating test data before hand, cleaning up any test data after test execution, analysis of results and compiling reports. The real value added to test automation is from test application library handling verification and actions on objects.
Advantages
Robustness:
There should be
minimum impact on automated scripts after there is change in application.At times Automation engine is way too fast on acting on controls on AUT. So it’s necessary to synchronize test script performs actions on controls when they are actually loaded. Framework allows us to do synchronization and make it robust test scripts
Maintainable:
It should be easy to fix if there are automation test script defects and QA should be able to add new automated test scripts. Framework makes test automation maintainable.
Extensible:
Having framework helps
in adding new features and modules to existing test automation suite without having to worry about the impact on the existing test scripts
Reusable/Modular:
With good framework
in place helps in reusing the same verification/validation code to be used
across the test scripts bringing down the time to develop new test cases
Disadvantages
Test team needs to have moderate development skills. Any tester with knowledge of developing programs using OOPs concepts and SQL should be able to write a strong automation framework.