Test Automation Frameworks
What is a Framework?
What is a TEST Automation Framework?
The guidelines like coding standards, test-data handling, object repository treatment. When automation scripting produces beneficial outcomes. Like, increase code re-usage, higher portability, reduced script maintenance cost.
What are the various Automation Frameworks available?
1) Linear Scripting
2) The Test Library Architecture Framework.
3) The Data-Driven Testing Framework.
4) The Keyword-Driven or Table-Driven Testing Framework.
5) The Hybrid Test Automation Framework.
1) Linear Scripting - Record & Playback
It is the simplest of all Frameworks know as Record & Playback. In this Framework, Tester records each step, Inserts Checkpoints in the first round. He then plays back the recorded script in the next rounds.
Advantages
- The fastest way to generate a script.
- Automation expertise not required.
- The easiest way to learn the features of the Testing Tool.
Disadvantages
- Little reuse of scripts.
- Test data is hard coded into the script.
- Maintenance Nightmare.
2) The Test Library Architecture Framework
In this Framework, test scripts recorded by "Record & Playback" method. The common task inside the scripts identifies and grouped into Functions. These Functions called by main test script called Driver.
Advantages
- A Higher level of code reuse in Structured Scripting as compared to "Record & Playback".
- The automation scripts are less costly to develop due to higher code re-use.
- Easier Script Maintenance.
Disadvantages
- Technical expertise is necessary to write Scripts using Test Library Framework.
- More time needs to plan and prepare test scripts.
- Test Data is hard coded within the scripts.
3) The Data-Driven Testing Framework
In this Framework Test case logic resides in Test Scripts. The Test Data separates and kept outside the Test Scripts. Test Data read from the external files loaded into the variables inside the Test Script. Variables use both for Input values and for Verification values. Test Scripts themselves prepared either using Linear Scripting or Test Library Framework.
Advantages
- Changes to the Test Scripts do not affect the Test Data.
- Test Cases execute with many Sets of Data.
- A Variety of Test Scenarios executed by varying the Test Data in the External Data File.
Disadvantages
- More time needs to plan and prepare both Test Scripts and Test Data.
4) The Keyword-Driven or Table-Driven Testing Framework
The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords. It independent of the test automation tool used to execute them. Tests design with or without the Application. The test in the step-by-step functionality of keyword-driven test.
There are 3 basic components of a Keyword Driven Framework viz. Keyword, Application Map, Component Function.
What is a Keyword?
The keyword is an Action that performs on a GUI Component.
What is Application Map?
An Application Map Provides Named References for GUI Components. Application Maps are nothing but "Object Repository"
What is Component Function?
Component Functions are those functions that manipulate or interrogate GUI component. A function would click on web button with all error handling, enter data in a Web Edit with all error handling. Component functions could be application dependent or independent.
Advantages
- Provides high code reusability.
- Test Tool Independent.
- Independent of Application Under Test, the same script works for AUT (with some limitations).
- Tests design with or without AUT.
Disadvantages
- Initial investment being pretty high. The benefits of this realized if the application is big. The test scripts are to maintain for quite a few years.
- High Automation expertise to create the Keyword Driven Framework.
5) The Hybrid Test Automation Framework
As the name suggests this framework is the combination of one or more frameworks. It discussed above pulling from their strengths and trying to mitigate their weaknesses. This hybrid test automation framework is evolving into overtime and many projects. Largest industry uses Keyword Framework in the combination of Function decomposition method.
Very good post.
ReplyDeleteAll the ways that you suggested for find a new post was very good.
Keep doing posting and thanks for sharing
Informatica training in hyderabad