Testing framework is
backbone of automation testing. They can reduce cost, increase re usability,
speed, reduce effort and a lot other benefits for QA. Main purpose of this
article is to explain frameworks, its uses and types of automation frameworks which
are majorly used. It’s for QA who are new to automation testing.
What is a Framework?
Basically, framework
is a set of rules, guidelines and/or standards that we need to follow to
achieve a particular set of objectives in a formalized way. Basically,
framework is a Skeleton that includes:
1. Common practices
2. Coding Standards
3. Common Test Libraries
In common words,
let’s take an example of Login.
Normal: Need to add
steps to login in every case that required logged in user.
With Framework:
Define Login function at 1 place and call where required.
Why we need a framework?
Framework plays a
vital role. Necessity of framework arises when multiple developers are working
on a project then it’s very necessary to have a common practice to follow for
development of test scenarios. Otherwise, everyone will be following its own
approach and that can cause a lot of problems like code re usability,
maintainability, readability, duplication of code and much more.
Benefits of Using Framework
Using a framework
will definitely results in low maintenance of scripts, re usability of tests,
increase speed and efficacy in many ways. Following are some key benefits:
1. Low maintenance cost
2. Increase re usability of Code
3. Increase in Speed
4. Increase Test Efficacy
5. Minimize Risk
6. Test Automation Framework
Test automation
framework is more like a system that has been defined specially to automate
test scripts. As we already discussed, Framework is more like a Skeleton, a
structure with enormous benefits that aid you to develop and execute test
scripts efficiently. In this way, you can have a better reporting of test
automation scripts.
Simply, it can be
said that a framework is a combination various guidelines, coding standards,
concepts, processes, practices, project hierarchies, modularity, reporting
mechanism, test data injections etc. to pillar automation testing. Thus, user
can follow these guidelines while automating application to take advantages of
various productive results.
The advantages can be
in different forms like ease of scripting, scalability, modularity,
understand-ability, process definition, re-usability, cost, maintenance etc.
Thus, to be able to grab these benefits, developers are advised to use one or
more of the Test Automation Framework.
Types of Framework
1. Module based Testing Framework
2. Library Architecture Testing Framework
3. Data Driven Testing Framework
4. Behavior Driven Development Framework
Let’s have a brief overview
of Frameworks.
Module based Testing Framework
Module based framework are based on OOPs concept- Abstraction.
Whole application is divided into modules, each module contains individual test
script. Each of them will be tested separately and then combined into a large
test layer. As Abstraction is used so separation is done in such a way that any
change in one module couldn’t affect other ones.
Reasons to Choose:
1- Easy to Maintain
2- While creating test script, less effort is
required.
3- High level of modularization
4-In case of change, only respective test script is
changed, rest of the code remains unchanged, which reduces effort.
Library Structure Testing Framework
This framework is based on module based approach but with some
benefits. The key difference between the two is, instead of making modules, we
make common functions that are expected to be used throughout the application e.g.:
click, retrieve values from drop down, etc. In this case, application is broken
down to achieve common objectives.
Reasons to Choose:
1-High re usability
2-Cost effective
3- Efficient
Data Driven Testing Framework
In This approach, data is placed separately from logic. In simple
words, Logic resides in test script and data in Test Data. Both are kept
separately and read using Excel, CSV, etc. files using variables. Test data
contains all the inputs and expected data and using one driver, same test can
be executed just by changing test data. Automation engineer can execute
multiple test cases based on only one script.
Reasons to Choose:
1- Time saving
2- Same test can be executed for different data sets
3- Increase Re usability
4- Less Maintenance Effort required
5- Increase flexibility
Keyword Driven Testing Framework
Keyword driven or table driven is basically an extension to data
driven approach. In this approach, data can be places separately from logic. This
is non-dependent framework that uses data tables and/or keywords which perform
the function on application under test. Data can be placed in any external file
that will contain some keywords
Reasons to Choose:
1- Increase Re usability
2- Minimal code is required
3- Independent of testing tool
4- Faster execution
Hybrid Testing Framework
As it name shows, hybrid means combination of any two frameworks. Every
framework has some advantages and disadvantages so by merging any two, we can maximize
advantages by minimizing weaknesses. Every application is different so as teams
move to agile, automation testing becomes more crucial. Hybrid framework can be
provide much better test results with proper efficacy.
Choosing a framework is very essential to automation testing. In
order to provide effective test results, development and delivery, its’ very
important to implement most reliable, effective and optimal framework.
I tried to cover most important areas. I hope you find it useful.Stay blessed J