What is an Automation Framework?

Spread the love
  • 145
  • 156
  • 123
  • 34
  • 23

Summation of these will create a business flow.

Modular framework in QTP /UFT
What is Modular Framework?

Let us discuss the modular framework architecture…
The core is the Master driver—This only consists of the calling business cases like—

  • login
  • Create user
  • Define attribute
  • Logout

The login module is again summation of 3-4 generic functions….like–

  • Open Application
  • Set user id
  • set Password
  • Click on Ok/submit

The data for this will come from the Data table
The Module(business specific) might call a function which is not generic for other module but can have some functions which are generic in nature
Write Customer Name in the text box is a generic function..where this is a type of setting a textbox with a specific value…this is generic across the application.
But if the test case is …

give 5% discount if the customer location is from Kolkata but 10% if he is from Hyderabad

This type of function is still generic but specific to that module only.
This way the Modular specific function is built .all this is called in the business level and sequentially called in Script level.
so the structure is…
Driver Script-consists of high-level business level statements. It is used to describe the sequence of tests to be executed.
Business Module-Consists of generic functions from generic function library or business specific functions from Business function library.
Common Functions:-Consists of all level of common functions.
Business Specific Functions: A library where all business specific functions reside.
Recovery Functions:  A Function library where all types of recovery functions reside.
Data Table:   Set of data for the testing.

In a traditional modular driven framework, we divided the entire flow as a small module and create a script so that these modules can be reused in the future. For a particular flow, we create modular specific databank or database. In this approach, data resides inside of the module and depending upon call correct datasheet get called and value gets read and used. This approach holds good if we use a single data set to test in the entire regression.

Advantages of Module driven framework:

  • Test data and business logic are separated.
  • Hierarchical structure.
  • Each tech script will have its own test data file so easy to maintain.
  • Generic or specific business library for business flows
  • Better recovery as each script will report pass/fail to master driver.
  • The script can also be made when the application is still under development.

Disadvantages of Modular driven framework:

  • Need proficient test code developer
  • Complex data management
  • Data is hard coded, we may lose the reusability hence it is better to drive data from the data source.
  • Additional time to analyze and make it modular is required often leads to duplicate. Good care is required.
  • Good programming is must so the automation developers need to have a good understanding of the tool and underlying language.
Folder structure for module driven framework
Folder structure for module driven framework
How a modular driven framework should look like?

I am going to describe a general idea about the folder structure of the module driven framework.

Folder structure for module driven framework
Folder structure for module driven framework


Folder structure for module driven framework
Folder structure for module driven framework


Folder structure for module driven framework
Folder structure for module driven framework


Folder structure for module driven framework
Folder structure for module driven framework

Folder Name Purpose
Root the name should be the project Name or the client name what every is good to identify.
Here we will be placing all the common functions, common objects, Common Recoveries
Function Library This is the place where we will be placing all the common functions. Its extension will be.VBS
Initialization file This file will be placed under a common folder and is required to save values during run time or to start a script. the extension can be .txt,.csv,.vbs
Recovery Scenario This is the file where all the recovery specific to all modules can be defined. Ideally, all known problems should be handled by code but this is a theoretical folder to have…Extension-.qrs,.xml
Modules All the modules and specific to modules cases will be kept here. Say i have a Module called customer
now under customer there can different functionalities…
1. Customer Registration
2. Customer Verification
3. Customer Activation
4. Customer Termination etc
———– Object Repository
This is a folder where module Specific repositories will be kept. Extension-.xml,.mtr….This Objects may be removed after use
———– Script This is a folder where module Specific scripts will be kept. .vbs will be the extension
———– Datatable This is a folder where module Specific Data tables will be kept. The initial of the data table will be the first two or three letters of the module.
like-CR-datatable.xls(used for Customer Registration)
———– Module Specific Recovery This is file where all the recovery specific to a module can be defined. Ideally all known problems should be handled by code but this is a theoretical folder to have…Extension-.qrs,.xml
Master Driver This is the folder where all your main script,datatable,Object repository related to Master driver will stay
——————Master Driver Script This is the Folder where the main driver will be kept
——————Sequence File
This file talks about the running sequence of master driver.Say you have 7 scenarios and you want to execute 3 of them ….Sequence file is the key to configure that.Please don’t be confuse with keyword driven framework’s sequence file
——————Datatable-Main This is a folder where Data tables will be kept. This datatable talks about the child scripts information and calling rules(say input,output)
——————Object Repository This folder contains the most common objects required to run the script.Please remember this will not be removed any point of time during the execution
——————Recovery Over all recovery and finally statement is written here


Hybrid Automation Framework

This is a combination of all frameworks .They are used whenever necessary.So is a summation of Data driven–keyword driven–Module approach.The main advantage is this is logic driven.Keywords are logic based.

Recording script using standard recording mode for any test tool is not enough for long term success for an automation.Also scripts needs to be developed by experts. Manual team can create the recording but proper way of coding and maintaining it should be automation expert’s duty.Otherwise it will create a high noice and high maintenance.There are several way to code properly.Page object model,Wrapper function implementation (Control and Window) are very popular in today’s automation. This post talks about the mixture of few approaches and try to find a definition for better automation development

What is Hybrid driven framework?:

As the name suggests, It is a combination or mixture of either two or more basic frameworks.Say some parts of your application is best solved by keyword driven framework and some parts can be resolved by only record and play back. Then you can apply both the framework.
say we have scenario where you have to test a signature or do a signature on a paint window or draw a picture. All leading frameworks fail at that point. No framework will support draw graphics of a signature . Building such coding will be expensive. So the solution is to add record playback framework with your existing framework to do this part.
It can also be data driven but modular approach.Any framework which is a combination of two different approach can be treated as hybrid framework.
It is the most commonly implemented framework due to its easy implementation and extensible.
Mostly combination of different framework is made to mitigate their risks and disadvantages and extend their advantages depending on the project objective.

Common Frameworks used for building Hybrid:
  1. Data driven framework
  2. Keyword driven framework
  3. Modular framework
  4. BPT framework
  5. Record playback(Linear framework)
Theoretical concept:
Theoretical concept of Hybrid Framework
Theoretical concept of  Hybrid Framework

The objective of building such framework is to maximize the strength of each framework and minimize the weakness. We are actually  hiding the weakness of one framework with another framework’s strength. One more intention to make such a mixture of framework is to make our run without any issue and manual intervention.

How to develop Hybrid Framework?
How to develop Hybrid Framework?
How to develop Hybrid Framework?

Test engineers checks the manual test scripts. Here we can have two conditions..

  1. The application is present
  2. The application is yet to come.
Based on the availability of the application test engineers may record the script .They can spy the object to create a repository or dictionary of keywords and objects.Or else they can write descriptive programming to proceed further. The code and flow should be easily understandable. The coding should be easy maintenable.
At this point test engineers will have to select set of approaches to be followed to automate a flow.After this point, there will be a brain storming process to detect the cost benefit analysis on different approaches. For each of the process the best yield results will be captured.
The set of best approaches will be summarised and published as Hybrid Framework.
Concept of Hybrid Framework
Concept of Hybrid Framework
There is no fixed guideline while developing the hybrid framework.

Anything that suits our requirement can be placed in hybrid framework. But as great freedom comes with great responsibility, Hybrid developers needs to careful and needs to have programming knowledge.

Proactively find issues in production is an important aspect of test automation.Automation runs best when you know the objective of it and guiding principles.
An important step to follow for using any framework is not to reinvent the wheel.Reuse whenever possible.Do not just automate in any one approach rather use something which is useful.This will give us greater value.
Tailoring the reporting will give more information than traditional reporting. There can be multi folds of reports.
1. Incident reporting- This talks about all the failures.
2. Escalation-This is refined for potential bugs.
Reporting also should talk about the type of bug, platform information, general statistics,detection rate, redundancy for tests. There are few good to have feature like-email triggering of the result,XML testdata file for light weighted testdata input,logfile generation etc. Sharing test result across team is very important.

It is having two way effect. One way development team will be extra careful next time on-word about the product code at the same time test developers will be extra careful while designing the test.

Concept of Hybrid Framework
Concept of Hybrid Framework
It is very important to seek feedback for further improvement areas.

Sometimes even the customer gives feedback about some corner cases which in house QA never thought off.For this purpose regularly observe the automation runs.Even the UAT testers can give lot of scenarios. It is always better to have existing automation scripts. But need to upgrade if some functionality is broken or needs up gradation. Automation execution can be really noisy for synchronization issues. Application slowness, test tools fastness contribute the most. There are third party software which also contributes to this. Be careful when using combinations of software or tool. By seeing the execution trends you can determine the same.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 145
  • 156
  • 123
  • 34
  • 23



Please enter your comment!
Please enter your name here