Automation testing framework is not a single process or tool, it’s a collection of tool and process working together to automate the manual process. Automation Framework uses various libraries, test data and various reusable modules to automate the manual process to save the time of the tester. Testing Framework is a set of rules which is used for creating and designing test cases.
The term automation refers to lowering of human involvement in various processes and doing the same process automatically with less human involvement. Test automation is the process of automating repetitive processes of users to make the work efficient which saves a lot of time.
Test Automation Framework not only offers the benefit of reusing the code which saves a lot of time but it also help others to write the code in a standard format. Hence, test automation framework handles all the issues which occurs while running the test. Automation Framework is also useful when user want to repeat the same process using test scripts when ever it is required to test on multiple browsers at the same time.
Purpose of a Test Automation Framework
• It improves the design and development of automated test scripts which involves re-usability of components or code.
• Provides a structured development of all test scripts which reduces dependency on individual test-cases which saves time to write the same code.
• Detects issues and bug with proper root causes with minimum human involvement.
• Reduces dependency on teams by automatically selecting the test to execute according to test scenarios.
• Enhance test accuracy and reduces test maintenance cost which involves lower risk of test failure.
• Improves utilisation of various resources and enables maximum returns on efforts.
• Ensures an uninterrupted automated testing process with little man-power involvement.
Different Types of Framework used in Automation Testing
Most common types of Test Automation Frameworks are:-
• Linear Scripting Framework: This framework is based on the concept of record and playback mode that is always achieved in a linear manner. Linear Scripting Framework mostly used for testing on the small applications in which step are written in a sequential order.
• Modular Testing Framework: Modular Test Frameworks break down test cases into small modules. There, the modules are independently tested first and then the application is tested as a whole which makes each test independent.
• Data Driven Testing Framework: In this testing framework, a separate file in a tabular format is used to store both the input and expected output results. A driver script where all test cases are called can execute all the test cases with multiple sets of data. This driver script contains navigation that spreads through the program which covers both reading of data files and logging of test status information.
• Keyword Driven Testing Framework: Keyword Driven test framework separates script logic from test data, then stores the data externally. After that, it stores the keywords in a different location. Since user can use the same keyword across different test scripts which re-uses the code.
• Hybrid Testing Framework: A hybrid test framework improves the weaknesses of different test frameworks. It is a combination of many types of end-to-end testing approaches which uses the advantages of other frameworks.
• Test Driven Development Framework (TDD): Test driven development is an approach in which test cases are developed to specify and validate that what will code do. It starts with designing part and develop test cases for small functionalities for your application, which instructs developers to write code if previous script fails.
• Behaviour Driven Development Framework (BDD): This has been derived from the TDD approach and in this method tests are more focused and are based on the system behaviour. Testers can create test cases in simple English language which helps even the non-technical people to easily analyse and understand the tests.
Benefits of Test Automation Frameworks
• Optimisation of Resources: Test framework helps in making the best use of resources, it does this by making the process easier with use of different resources according to organisational needs.
• Increased Volume of Testing: Test automation frameworks increase the volume of testing by perform test on many devices as it’s not possible to perform manual testing on all devices.
• Simultaneous Testing: Test automation frameworks enable simultaneous testing on different types of devices. When test scripts are automated, than testers can perform the script on other devices at the same time.
• Enhanced Speed and Reliability: Performing different test cases manually can be very time consuming so instead of it we can run all the test cases from our script in very less time.
• More Output in Less Time: An automation script minimises the time taken to prepare and run tests. With increased efficiency and speed, we can gain more output in less time.
• Fixing Bugs at an Early Stage: Test automation framework helps in fixing bugs at an early stage which don’t need much manpower to carry which saves time and expenses of the organisation.
• Remote Testing: With a test automation framework, you don’t need to see all test cases, you can run the test cases and come back later and view the result. User doesn’t need to be present at execution time physically.
• Reusable Automation Code: You can use your automation script in any of your other application or website which has same functionality which increase the code re-usability.
Steps for an Effective Test Automation Approach
• Evaluate to understand real need for automation based on Website/Application type: We should first evaluate what need to be automated which saves the time of the user which he losses it by doing it manually.
• Define automation goals and priorities: The Goals should be first set so we can move ahead in that direction to make the test script and achieve it while having priorities to automate.
• Plan automated testing strategy: Automated Testing Strategy should be planned so that test cases should be built accordingly.
• Select right automation testing tool & testing framework based on your project requirements: The Testing tools & testing framework should be selected before automating the manual process so the script which we are making should be constructed in a proper way with right tool.
• Decide which test case to automate: We should know which test case need to be automated because it can save the time of the user which he spends doing it manually.
• Develop good quality of test data: The script which you are creating should be of good quality which can be used later also and the data which it produces as a result should be in readable format.
• Create automated tests which are more stable to UI changes: Automated Tests which are created should be stable enough even if there are some minor changes in the UI than also your script is able to run the test.
• Execute tests for test scripts developed: Test Scripts which are developed should be executed so the result can be known whether it is correct or not and we can check whether the script which we have created is stable enough or not.
• Test early and often with continuous integration and continuous delivery (CI/CD) pattern: We can test our script early with Continuous Integration and Continuous Delivery that whether the script which we have created is good enough or not.
• Maintain test scripts for future use: Test Script which you have created should always be kept for the future use so you don’t have to write the same code again and again, which you can reuse the code of the script which is required in your new script.
Common Misconceptions about Automated Testing
• Automation will provide you with more free time: The misconception that automation will provide you more free time is both true and false. In manual testing, most of the time is devoted to explore and do functional testing where we manually search for errors.
With automated testing, that time is cut drastically. The work for automation testers is instead spend in coding the test script and making improvements to tests repeatedly as adjustments are needed.
• The Cost of Automated Testing is Too High: Investment in automated testing might feel costly, especially for a smaller company. But according to report, over time, automated testing pays for itself.
Automation testing also reduces the cost for multiple code revisions, over the course of time, the investment pays out. Manually repeating these tests is costly and time-consuming; but automated tests can be run over and over again at no additional cost.
• Automated Testing is better than Manual Testing: There is no superiority in the automation vs manual; they are just “different”. Manual testing is performed by a human sitting in-front of a computer carefully going through application; trying various input combinations, comparing the results to the expected behaviour and recording the results.
Automated testing is often used after the initial software has been developed. Lengthy tests that are often avoided during manual testing can be automated to save the time. They can even be run on multiple computers with different configurations.
• Automated Testing Inhibits Human Interaction: Automated testing is more clear-cut and faster than what humans could do with less human errors, so this misconception is understandable.
Automation testing do not replace face-to-face communication which is a necessary part of a software development. Instead, it increases the aspect by providing another channel through which to communicate.
In case you have any queries then feel free to ask in the comment section below.
This is all about Basics of Test Automation Framework.
Thanks for reading this blog.