top of page

Different type of frameworks

What is Framework in Automation Testing?

A Test Automation Framework is a set of guidelines like coding standards, test-data handling, object repository treatment etc… which when followed during automation scripting produces beneficial outcomes like increased code re-usage, higher portability, reduced script maintenance cost etc. These are just guidelines and not rules; they are not mandatory and you can still script without following the guidelines. But you will miss out on the advantages of having a Framework.

Why do we need the Framework?

  • Easy code maintenance

  • Increase in code re-usage

  • Higher code readability

  • Reduced script maintenance cost

  • Reduced tests’ time execution

  • Reduced human resources

  • Easy reporting

Types of Test Automation Frameworks:

I will explain the most popular Types of Selenium Automation Frameworks.

  • 1. Linear Scripting Framework

  • 2. Modular Testing Framework

  • 3. Library Architecture Testing Framework

  • 4. Data-driven Framework

  • 5. Keyword Driven Testing Framework

  • 6. Hybrid Driven Testing Framework

  • 7. Behavior Driven Development Testing Framework

1.Linear Scripting Framework:

Linear Scripting Framework is a basic level test automation framework that is in the form of ‘Record and Playback’ in a linear fashion.This framework is also known as the ‘Record and Playback’ framework.

This type of framework is used to test small-sized applications.In this type, the creation, and execution of test scripts are done individually for each test case individually.Testers capture each test step such as browsing, navigation, user inputs, enforcing checkpoints. Testers then play the scripts to carry out the tests.

Advantages of Linear Scripting Automation Framework:

  • Can generate test scripts (Record and playback) without planning much or consume much time

  • Coding knowledge is not required

  • A quick way to generate test scripts

Disadvantages of Linear Scripting Automation Framework:

  • Lack of reusability due to autogenerated scripts

  • Hard coding the data doesn’t allow us to run with multiple data sets

  • Maintenance is high – It requires a lot of effort to do even small changes.

2.Modular Testing Framework:

In the modular testing framework, testers create test scripts module wise by breaking down the complete application under test into smaller, independent tests.In simple words, testers divide the application into multiple modules and create test scripts individually. These individual test scripts can be combined to make larger test scripts by using a master script to achieve the required scenarios. This master script is used to invoke the individual modules to run end to end test scenarios.The main reason for using this framework is to build an abstraction layer to safeguard the master module from any changes made in individual tests.In this framework, testers write function libraries to use it whenever required. This is AKA modularity framework or module-based framework.

Advantages of Modular Testing Framework:

  • Better scalability and easier to maintain due to breaking down the complete application into different modules

  • Can write test scripts independently

  • Changes in one module bring no or low impact on the other modules

Disadvantages of Modular Testing Framework:

  • Takes more time to analyze the test cases and to identify reusable flows

  • Due to hardcoded data in the test scripts, it’s not possible to sue multiple data sets.

  • Requires coding skills to set up the framework

3.Library Architecture Testing Framework:

Library Architecture Testing framework aka “Structured Scripting” or “Functional Decomposition”It is based on the modular framework with some additional advantages.In the modular testing framework, we divide the application under test into modules whereas here we identify the common tasks and grouped them intofunctions. Once the functions are grouped then these groups will be kept in a library. The test scripts reuse these libraries to create new test cases.

Advantages of a Library Architecture Testing Framework:

  • Script maintenance is simple

  • Easy to scalable

  • Functions library is reusable and it can be reusable

Disadvantages of a Library Architecture Testing Framework:

  • Coding skills are required

  • It takes more time to prepare test scripts

  • A fixed set of test data is hardcoded within the scripts

4.Data-driven Framework:

The data-driven test automation framework is focused on separating the test scripts logic and the test data from each other.It allows us to create test automation scripts by passing different sets of test data.The test data set is kept in the external files or resources such as MS Excel Sheets, MS Access Tables, SQL Database, XML files, etc.,The test scripts connect to the external resources to get the test data.By using this framework we could easily make the test scripts work properly for different sets of test data.This framework significantly reduces the number of test scripts compared to the module-based framework.This framework gives more test coverage with reusable tests and flexibility in the execution of tests only when required and by changing only the input test data.It is reliable in terms of no impact on tests by changing the test data but it has its own drawbacks such as testers who work on this framework needs to have the hands-on programming knowledge to develop test scripts

Advantages of a Data-Driven Framework:

  • It supports multiple data sets

  • Modifying the test scripts won’t affect the test data

  • No need to hardcode test data

  • Saves time by executing more tests

Disadvantages of a Data-Driven Framework:

  • Require coding skills

  • Setting up the framework and test data takes more time

  • Need experienced automation testers to design framework

5.Keyword Driven Testing Framework:

It is also known as table-driven testing or action word based testing. In Keyword-driven testing, we use a table format to define keywords or action words for each function or method that we would execute.It performs automation test scripts based on the keywords specified in the excel sheet.By using this Framework, testers can work with keywords to develop any test automation script, testers with less programming knowledge would also be able to work on the test scripts.The logic to read keywords and call the required action mentioned in the external excel sheet is placed in the main class. Keyword-driven testing is similar to data-driven testing.Even though to work on this framework doesn’t require much programming skills but the initial setup ( implement the framework) requires more expertise.

Advantages of Keyword-Driven Frameworks:

  • No need to be an expert to write test scripts

  • It is possible to reuse the code. We can point the different scripts to the same keyword

  • Even though application changes, test scripts don’t change.

  • Tests can be designed before developing the application

  • Test scripts work independently of an application under test with basic modifications

  • Not dependent on test tools

Disadvantages of Keyword-Driven Frameworks:

  • Take more time to design

  • The initial cost is high

  • Employees with good test automation skills needed

6.Hybrid Driven Testing Framework:

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. Most of the teams are building this hybrid driven framework in the current market.

7.Behavior Driven Development Testing Framework:

The purpose of this Behavior Driven Development framework is to create a platform that allows everyone (such as Business Analysts, Developers, Testers, etc,) to participate actively. It requires increased collaboration between Development and Test Teams. It doesn’t require the users to be acquainted with a programming language. We use non-technical, natural language to create test specifications. Some of the tools available in the market for Behavior Driven Development is cucumber,jbehave etc.,

The frameworks stated above are some of the most popular Test Automation Frameworks used by the automation testers.

Framework Key Features

--Scalable, robust and reusable – Manages a large number of scripts in real-time – Easy to maintain test scripts – Common reusable components include function library, driver script & configuration files – Consists of separate features related to Test Design – Consists of separate features related to Test Execution and Test Reporting

– Integrates with all latest market trending new technologies – Flexible framework (as simple as a Plug and Play) – Integrates well with alternate frameworks supporting many programming languages – Supports Cross Browser Testing

--Reusable Components – Command Line Execution – Integration with Test Management and Bug Tracking Tools – CI Integration with Jenkins – Multiple Notification Formats – Object Identification Page Object Model

What are the major advantages of Automation Frameworks for Enterprises?

Cost-Effective Benefits

– Helps reduce time-to-market as it delivers continuous execution of automated test scripts – Ensures enhanced scalability – Reduces operational costs – Delivers faster and quality products for launch – These frameworks ensure higher test performance over manual testing – Though initial costs are high but lowers overall maintenance costs – These automation frameworks become reusable and brings in cost-effectiveness as they can be used for similar testing needs in the future with the same test scripts – Delivers comprehensive defect management reports

Application-Efficiency Benefits

– Identifies defects early with effective detection of bugs and issues – Ensures maximum test coverage as end-to-end automation testing frameworks are used – Reduces manual efforts as tests are fully automated and need less manual intervention – Most significant usage is with respect to code reusability – Delivers greater efficiency as testing time consumed is reduced – Automated scripts save lot of QA time and ensures quality is maintained and delivered – Automated tests can run anytime,anywhere as the system runs them automatically – Bug tracking reports deliver comprehensive reporting that is useful to DevOps teams – With agile and DevOps, and continuous deployment, test automation and continuous integration is the key and pre-requisite to ensures continuous testing is achieved

434 views0 comments

Recent Posts

See All
bottom of page