There is a lot that has been written about Test Automation, and one of the most important parts of a successful automation practice is picking your framework. In this article, we’ll cover what a framework is. We’ll focus on test automation frameworks and the types of test automation frameworks that you can use, and briefly touch on test automation tools.
What is a Framework?
According to Software Testing Help, “A framework is considered to be a combination of set tools, protocols, rules, standards, and guidelines that can be incorporated or followed as a whole to leverage the benefits provided by the Framework.”
There are many rules (sets of guidelines) when it comes to building the right Test Automation framework. If followed, the guidelines, bring more benefit and less trouble for users.
Frameworks have key distinguishing features that separate them from normal libraries:
- Inversion of control: in a framework, unlike in libraries, the overall flow of control is not dictated by the caller but by the framework.
- Extensibility: the ability for a user to extend the framework—usually by selective overriding; programmers can add specialized user code to provide specific functionality.
- Non-modifiable framework code: the framework, in general, is not supposed to be modified, while accepting user-implemented extensions. In other words, users can extend the framework but should not modify its code.
Test Automation Framework
A Test Automation Framework is a framework that is created specifically to provide an execution environment for the automated test scripts. It provides the user with various benefits that help them to develop, execute, and report on automated test scripts efficiently.
Here are some of the advantages of using a Test Automation Framework: ease of test development, scalability, modularity, readability, re-usability, and maintainability. There are several types of test automation frameworks that you can use for different types of testing/testing scenarios.
Types of Test Automation Framework
Linear Automation Framework
Also known as record-and-playback framework, testers use linear automation frameworks to record test steps and then play the script back automatically to conduct the test.
Modular Based Testing Framework
Built on the concept of abstraction, Modular Based Testing Framework divides the entire “Application Under Test” (AUT) into a number of logical and isolated modules. For each module, we create a separate and independent test script. Abstraction layer hides isolated module(s) or component from the rest of the AUT. Thus the changes made to this module do not affect others. These test scripts can be combined to make larger test scripts to achieve required scenarios.
Library Architecture Testing Framework
Library Architecture Testing Framework is also known as “Structured Scripting” or “Functional Decomposition”. The basic fundamentals behind this framework include determining the common steps, grouping them into functions under a library, and calling those functions in the test scripts whenever required.
Data Driven Framework is “focused on separating the test scripts logic and the test data into two steps. Data Driven automated testing is a method in which the test dataset is created in the excel sheet then imported into Automation Testing tools to feed to the software under test” (Software Testing Help). By using this framework we easily make the test scripts work for different sets of test data.
Defined by Tools QA, the Keyword Driven Framework is a type of Functional Test Automation Framework. It is also known as Table-Driven testing or Action Word Based testing. The Keyword Driven Framework will divide a Test Case into four different parts: the Test Step, the Object of Test Step, the Action on Test Object, and the Data for Test Object.
The main idea behind the Keyword Driven approach in Automation is to separate the coding or technical part from the test case & test step. This helps a non-technical person to understand Automation well.
This is further illustrated with the “action word based testing approach”, Action Based Testing. Action-Based Testing is a modern approach to Keyword-Driven Testing. Action Based Testing is a modular-design and action-driven test method that provides a systematic approach to increase the success of automated testing. Modular-design addresses the challenges of test planning and test case management through efficient test organization. Action-driven test development eliminates the majority of the programming work required to automate and maintain tests long-term. This alleviates the need for having a technical testing staff.
Hybrid Testing Framework
A Hybrid Test Automation Framework is the combination of two or more frameworks mentioned above. It attempts to leverage the strengths and benefits of other frameworks for the particular test environment it manages.
Behavior Driven Development Framework
According to Wikipedia In software engineering, Behavior-Driven Development (BDD) is a software development process that emerged from Test-Driven Development (TDD). Behavior-Driven Development combines the general techniques and principles of TDD with ideas from domain-driven design, object-oriented analysis, design (to provide software development), management teams with shared tools, and a shared process to collaborate on software development.
There are various other frameworks also in place. In this article, we discussed the basics of a Test Automation Framework. We also discussed the types of frameworks available in the market. Keyword-Driven Framework and Hybrid Testing Framework seems to have more benefits (than others).
If you are looking for an Automation Testing tool that can help you design a solid Test Automation framework then TestArchitect may be a good starting point. By utilizing Action Based Testing, this keyword driven approach allows for teams to create multiple Test Automation Frameworks for Keyword Driven testing, BDD, and Data driven testing. LogiGear’s CTO, Hans Buwalda, discusses read how Action Based Testing can be used for both BDD and Data Driven testing in his Techwell Insights column. TestArchitect can be downloaded free online at testarchitect.com.
Author: Hien D. Nguyen
Hien D. Nguyen is an experienced Software QA Engineer at LogiGear Corporation. A tester by day and a blogger by night, Hien has a great passion for software testing, especially complex test automation problems. When not doing all those, he enjoys reading, jogging and trying new things.