Automation Framework

What is an Automation Framework?

Table of Contents

Share and Enjoy !

What is an Automation Framework All About??
What is an Automation Framework All About??

We frequently hear the term framework in automation testing arena. We being automation testers need to understand what is an automation test framework? This post will cover framework in automation in details.

The idea behind the framework

Do not repeat yourself should be the main objective of BPT automation. Be it be script design, be it be a lesson. lessons are not learned always so well. this triggers more failures than automation scripts.

We need to have a killer instinct in terms of completing the task. Engineering works always under a heavy workload. Hence what is postponed today thinking we will complete that soon, that soon will never appear. Sad but true.

Automation is always complex and technical, hence it is always better to plan and prepare for it. Hence a bunch of non trained automation engineers will likely to take a longer period to deliver test code.

Script based mostly test automation equipment have been all around given that early 1990′. In truth Visual Exam 1. from Microsoft was introduced in 1992. And several of the applications we have now – have their genesis of that period. Correct from QTP, Rational Purposeful Tester, Winrunner, and lots of others leverage styles of frameworks to automate GUI testing.

These frameworks in the last two a long time have an elementone drastic transform. They have evolved in the pursuit to make take a look at automation much better. They have matured to reduce the upkeep overhead, provide really tested and trusted check scripts, and present simpler strategies to acquire check automation. In this short article we will restrict our scope to these frameworks and revisit why they filed into oblivion.

More Myths about Automation

Before we go ahead and discuss more automation framework, let us understand a few concepts about automation testing.
Lets us talk about a few myths first about automation testing.
  1. Test Automation is very easy and anybody can implement a test automation strategy. Anybody can develop a script. Well, this myth is developed by the salesperson of the company to make sure their tool gets sold out. While demoing their tool, they always follow the record playback strategy. just record a simple flow, enhance by using test data concept, run the script shows the result. With this sales technique, we started feeling that anybody can script. But the reality is completely different. Automation is not all about record and playback. It needs to be designed, then developed and tested. Definitely, test engineer needs to be from some programming language background or they need to learn languages, at least the basics. Automation development is not as complex as application development but these source codes must be saved as application source code.
  2. Tool design is better than evaluate tools. Mainly this concept came from the expensive tools available in the market. Test engineers or organization try to avoid the license cost of such a tool. They prefer to build their own tool. Or try to use free scripting or languages like VBA, macro, Perl, Ruby to design test. These things can be considered a lean approach. But not Automation.
  3. But the fact is when you use a proper tool to automate the productivity will be higher which is significantly less than the license cost. Using other technique can be considered as research and development but not proper automation.

With a proper test tool with the license will give automation test engineer more command over the QA arena. Let us see how?

  • Most advanced tools will have a proper encapsulation of programming. So less advanced coding required here.
  • More the mature tool more great customer care. But the opensource tool will have less or no customer support.
  • Advanced tools will get a constant update about technologies.
  • Huge support base including different forums.
  • Readily available framework and integration with other technologies.
  • The advance tool will have more functionalities in different technologies covered.

The Evolution of Test Automation Frameworks

Script dependent exam automation equipment has been about given that early 1990s. In simple fact, Visible Check 1. from Microsoft was produced in 1992. And lots of-of the tools we have now – have their genesis of that era. Proper from QTP, Rational Functional Tester, Winrunner, and lots of other folks leverage sorts of frameworks to automate GUI screening.

These frameworks in the past two a long time have undergone drastic alter. They have advanced in the pursuit to make check automation greater. They have matured to reduce the upkeep overhead, give remarkably tested and reputable examination scripts, and supply simpler approaches to establish test automation. In this article, we will limit our scope to these frameworks and revisit why they light into oblivion.

File and Playback:

Even nevertheless this includes possibly no or nominal code composing, manageability of automation code will make Record/Playback only viable on a modest scale. The basic challenge of this method is virtually the difficulty of scale. If we want an additional automated test, we will document one more script which sooner or later success in two scripts to be maintained as the AUT’s interface has improved with time.

The more assessments we document, a lot more automation code requirements to be managed – which will become too much of a load on tests funds. In report and playback, every single automatic check situation is a sequence of steps with taking a look at data tough coded into it. This, for starters, is not a good technique as per the computer software engineering concepts. Next, payback in automation starts off when we playback the exact automation to take a look at the subsequent versions of the software.

But, in this strategy, every test is operating once for every launch and is not used regularly to improve the test protection. Thus, to deal with this sort of automation code makes this technique impractical for substantial scale automation. For that reason, it is only because of to the expense of servicing, exam automation has moved previous History and Playback.

Information Pushed:

In comparison to Record and Playback, Data Driven framework addresses two main ache details: maintainability and check coverage. Examination details are saved in a different file which is read through by the script to be utilized as entering to AUT.

Just about every script is programmed and managed by taking a look at specialists but can be utilized regularly with diverse data sets to enhance the check protection. This also imparts self-assurance into the trustworthiness of the script.

But, testing is not about just inputting info. It is about simulating genuine life small business eventualities to examination the AUT completely. As a result, testers will need the facility to specify real exams. They have to have a technique to specify which details to use when from which details file.

Keyword Driven:

This requires test automation to the next stage. It is not the script now that directs testing but it is the examination data by itself. The exam details with the use of key terms sequences out the actions to be followed.

When the automatic exam circumstance runs, it will read through by the examination info and call for the related script specified by the search phrase, passing AUT the facts for that line. Therefore, search phrases are scripts published by taking a look at professionals to carry out all necessary steps to take a look at the organization/functional undertaking for which this script was prepared.

With this solution, the testers have the entire control in excess of what to do and in which buy. But, enhancement of automation code is still AUT precise. The price and the amount of money at which the UI of AUT undergoes improve so will the upkeep of the scripts. Consequently, for big scale check automation, we even now require to find means to minimize the need to have to consistently preserve scripts.

UI Object Map Primarily based:

In the pursuit to make take a look at automation greater, UI Item Map framework solves all the 3 challenges of examination automation. It resolves the maintainability, trustworthiness, and the ease of progress of taking a look at scripts.

This framework usually takes instruction from check facts, recognizes the class of item to be acted on, and then performs the specified motion on that item by calling a script for that individual item course, passing actions and info to it.

This indicates the scripts are no extra AUT specific but are UI object course distinct. No script for precise instance of an item but for the course of the object. At the time the script for a course of UI item is composed, it can be reused in any automation venture exactly where this class of UI object is currently being applied.

By way of this framework, scripts automate the course of UI object. And whenever the AUT undergoes modify, you will need to only change item map and the information, not the scripts for the UI object class. The only time this demands to be improved is when new UI objects are released or when the actions of present UI-object-course variations.

Ref-Evaluation of framework
Automation Framework:
In general, Framework is an integrated part of automation testing. This is a structured combination of ..
a.Testing best approaches
b.Testing Assumptions
c.Testing Practices
d.Testing Concept

let us understand the tool based testing…
Simply purchasing or leasing a tool does not guarantee success with that tool. Each type of tool may require additional effort to achieve real and lasting benefits. There are potential benefits and opportunities with the use of tools in testing, but there are also risks.

Test execution tools

Test execution tools replay scripts designed to implement tests that are stored electronically. This type of tool often requires significant effort in order to achieve significant benefits.

Some of the Significant Variables on Automation framework

Software package screening right before release is crucial for any enterprise to preserve its situation among clients and companions. The computer software has to perform as well in each system and state of affairs and should be a strategic aspect of the entire SDLC. Amount of regular revisions will make testing extra innovative in excess of time, getting to be more substantial and greater proposal more than time.

The remedy to this lies in the adoption of automation screening, which can be defined as the implementation of a sequence of steps devoid of human intervention. The objective of this procedure is to eliminate male produced problems and supply a lot quicker final results. Companies that pick out to automate checks go the threshold of profitability for the expense of labor, just after only 2 to 3 sets of test. This is genuinely superior for efficiency tests, anxiety screening or repetitive software actions.

READ  Top Ten Strategies to Make Test Automation As a Service

There are many things dependable for the profitable development of a framework for examination automation. The essential components are:

Commitment: Management will have to be actively concerned in the exam automation framework growth.

Expenditures and spending budget: creating a framework for automatic testing budgeting wants.

Process: The system will have to be effectively defined, with no advert-hoc tests and orientation outlined for the exam, test protection and exam criteria for every single stage.

Relevant Means: To make certain that automation Framework progress goes nicely, there must be a devoted group.

Practical: The management really should be practical and 100% computerized testing is not achievable and that all take a look at can not be automated. It will deliver success after quite a few cycles was carried out and there is no instant return on the expenditure for the construction of the Automation screening framework.

The main advantages of tool based testing are:

  1. Consistency -process repeatability and resource independent
  2. Structured approach
  3. Maintenance becomes very low.
  4. Maximum Reusability
  5. Proof of adequate testing
  6. Unattended execution or nightly execution
  7. Maximum coverage of requirements.
  8. Common standard across projects
  9. Non Technical person can start design code
  10. The modification during scripting should be very easy.
  11. Data Orientation for execution over the different data set
  12. Huge reduction in testing cycle time
  13. Reduce overall QA cost
  14. Eliminate tedious manual effort and manual error

Automation testing is a lengthy process as well as a very sophisticated approach.its life cycle can be written as  requirement analysis —>test planning–>test design–>test development—>execution of test cases–>bug logging—>reporting —> maintenance.

Moreover automation is used to downsize manual effort not to replace the same.

Types of Framework:

There is no hard and fast rule to design a framework.
Basic:
a.Record and playback
Advanced:

  • Data Driven Automation Framework
  • Keyword Driven Automation Framework
  • Modular Automation Framework
  • Hybrid Automation Framework
  • BPT Framework.
  • Device Testing Automation- Device Simulation Framework
  • BDD
  • TDD

 

Record and playback framework in Automation

This is a simple record and then playback. The only enhancement is to parameterize the data that changes. It is having less re usability. It is the only driver and delivers the concept. Capturing tests by recording the actions of a manual tester seems attractive, but this approach does not scale to large numbers of automated tests.

A captured script is a linear representation with specific data and actions as part of each script. This type of script may be unstable when unexpected events occur. Most of the time scripts are not modified to check the change in software but a new script is build to test. It is often referred to as the Linear framework.

When you can go for record playback?

Mostly when your application is like mainframe where we can only tab around the application and send test data. So if any application only accepts keystroke, then record and playback could be an option.

Script1+Test Data 1 +repository1.mtr—>i.e/any browser–>UAT
Script2+Test Data2 + repository2.mtr—>i.e/any browser–>UAT
Script3+Test Data3 + repository3.mtr—>i.e/any browser–>UAT
It is very easy way of developing and delivering script.
Record playback framework is the quickest way to develop test scripts. It is having zero reusability. It commonly follows the spaghetti test development pattern. Nontechnical or novice coders can develop Automation test cases.
Test iteration is controlled by Run Tab of test settings. Action options can be configured to Action call properties.
Let us understand how many recordings are there in QTP.
There are 3 types of recording:

  1. Normal Recording – done on a standard object. Mainly context sensitive. It is the default recording mode. By this QTP recognizes the application property depends on the assistive and mandatory property. Mainly click,dbclick,drag,drop etc
  2. Analog Recording- Based on the track. Records the movement of the mouse. This is useful when objects are not identified by regular recording mode. It is relative to the screen or to the specific window. if screen changes by dimension, it is very difficult to handle. It can record the keyboard operation though.
  3. Low level-It is applicable when QTP cannot identify the object at all with the above two methods. It records all run time objects. It is also dependent on position. QTP can automatically switch to the low-level recording if needed.

Let us look at how QTP runs in those cases: Run mode also have three categories.

  1. The normal mode of running: Useful for debugging. Executes slowly and lets us see the application changes.
  2. Fast mode: It is good when your application is fully up and running. Executes very fast. Not recommended when the application is slow or responding slowly.
  3. Update mode: useful when the application is changing. We can update the objects description, the checkpoint values, active screen image. But it can not update the parameterized values such as data tables, environment variables. Navigation Automation–>Update Run mode

Let us understand what are the disadvantages of the record-playback framework.

  1. It is a one-time activity
  2. The data is not parameterized hence coded values are present [I mean test data are hard coded]
  3. Scalability is low.
  4. No portability
  5. Maintenance is high.
  6. ROI is lowest among all the framework
  7. Test assets, reusability, and resource productivity is lowest among all the framework
  8. This type of script is not reliable.
  9. Can not handle complex test design

Data Driven Automation Framework

Repeated use of Test Scripts with different inputs. A data-driven approach separates out the test inputs (the data), usually into a spreadsheet, and uses a more generic script that can read the test data and perform the same test with different data.

Generally, where the flow remains the same and objects do not change, Data-driven framework can be very useful. Testers who are not familiar with the scripting language can enter test data for these predefined scripts. Input data is given a pool of data set.

Even the output data comes out from the data pool. It helps us to reduce coding for a large dataset. Ease of Testing of Time consumption. It is best used in IBM-Rational Robo. Data is not hardcoded here, instead, data are stored and provided from a data source like -XML, Excel, flat file, Database or combination of all. As the data layer is separated from the code , the same scripts can be reused multiple time.

  1. There is no model to be followed to generate automation test cases.
  2. Coverage is limited.
  3. Coverage is time bound.
  4. Looping almost disappears.
  5. No of variables grows up which sucks up machine performance.
  6. The data table may become too huge and too complex.
  7. Reusability is very less.
  8. Domain-specific languages are poorly researched and hard to design.
  9. Need close collaboration between functional and automation team.

Keyword Driven Automation Framework

Steps and data are fed to the automation tool. Automation tool judges the steps and input data from a data pool, It gave the output data. In a keyword-driven approach, the spreadsheet contains keywords describing the actions to be taken (also called action words), and test data.

Testers (even if they are not familiar with the
scripting language) can then define tests using the keywords, which can be tailored to the application being tested. It is very sensitive towards data design. This is based on generic keyword based.
The advantage is the setting of keywords can test window/web/Oracle etc based application.

With the advancement of automation framework, after record and playback, Keyword driven framework is the most robust and acceptable framework while automating huge test cases.

The more the framework easy to use ,more and more test engineers will jump into automation that will intern increase the coverage and testcase count.Automation will never face the starvation issue as there will be plenty of test cases to automate.It is true that sometimes,if we change the approach , we may get more bugs via automation.Breadth over depth approach to testcase automation gives more bugs. Instead covering all features ,it is better to go for a specific features covering all the objects. There should be a balanced approach for selecting depth and breadth testing.

This framework is an application independent way to design testcases. The testcases are supported via data table. Mostly a database supports the vocabulary of keywords.A core library is required to read all these lines from Excel or data source and convert them into equvalent QTP /Selenium/other tool command.

The keywords are simple and clear [like open_bowser,Close_browser,setValue].Each keyword will be mapped to a known action.There can be multiple inputs for the action. Like -Locator,Text. Even an action can be an input to another action.Now this framework is combination of tables[Cycle table,test table]. Below are the sections where I have shown how is the structure of a keyword driven framework…

In keyword driven testing there exists five different parts..

  1. Control file
  2. Testcase file
  3. Startup Script
  4. Driver Script
  5. Utility Script

What is Control File?
Well, this file contains all testcases. Based on some parameters or conditions some of the testcases will be executed.
What is Testcase File?
Detailed design  test cases.Mainly written column like-Keyword ,Object Name , Parameters.It is an excel file in most of the cases.This will also include the start up and tear down methods.
What is Startup Script?
This is the initialization script. It creates the environment to run the testcases.Assembles the testcases those are marked to be runable in control file.
What is Driver Script?
It drives the test flow,gets input from stratup script [Which scripts to run]. It reads the testcase file for the corresponding steps. And It takes the input passes that to script engine to generate the code according to the test tool and corresponding script gets executed.
A good framework should allow any combination of features to be tested. Initial days we used Excel to select testcases.As technology progressed,we use web interfaces with simple UI where check box can be checked to select testcases.User friendly,self explanatory web interface ensures good productivity as it reduces the technical barriers.Jenkins,QC are very good example.  This feature will support mini regression to full regression.
What is Script Engine or Utility Script?
Script engine is responsible for tool specific code generator. Kind of tool understandable code generator. The code will be executed on the tool.
Utility script: Utility Scripts are the low level test steps to perform some operation.Some common utility methods are-

  • LaunchApplication
  • CallScript
  • ReportLog- It is also known for debug logger. It gives more clarity on real bug and noice.

Sometimes all supported libraries we put in Utility Script.like-

  • File Handling,
  • String handling
  • Database access

Execute -Execute and Execute should be main aim for this approach. This is keep the maintenance low and scripts updated. This will give great ROI.
There may or may not be any object repository present. There is further reusable concept hence all functions, keywords etc will be generic in nature.

Advantages of keyword driven framework:

  • Change management is easier
  • Does not dependent on the UAT
  • Much easier to extend.
  • Similar to functional test script so easy for non technical or non tool experts in terms of understanding.It is easy for them to develop scripts.
  • When developed block by block it becomes highly user friendly.Real power of functional decomposition can be seen.
  • This will also cut down the test engineers tedious and lengthy testcase creation time. Manual testers will have  bugs.
  • Easy to modify so maintenance cost is low with compared to other framework.So greater ROI could be achieved.
  • Advanced keyword driven framework is having two layers…one is pure code layer and other is pure English or non code elite language.Functional people can prepare the test cases very easily.
  • If the infrastructure is separated from logical layer then any test cases can be automated.
  • After a couple of months when the basic building blocks(unique components) are ready to design  a functional flow, the development cost will down.
  • So this will provide better ROI.
  • If application is getting changed, it can determine the changes on run time .It can change only that component.No need to debug the entire script. Hence it is very easy to maintain.

Due to simple English interface, it is best for manual test engineers,functional analysts and business analysts.

Disadvantages of keyword driven framework

  • Naming convention is tough for large projects.
  • Very tough to remember the keywords.
  • Initial investment for framework design is high.
  • High skilled labor is must for initial days of the project.
  • Not very to understand for new comers.

So to conclude, it is one of the finest flavor of data driven testing but having most time consuming process.But the keyword preparation is one time effort. Once completed,it can handle any size of project.This approach will uncover the code issues in an automation at earliest. Automation code is also a software code that needs to be tested.By this approach,we can test automation code as well.As a result it is more likely to uncover more bugs.

Modular Automation Framework
In this approach,The whole scenario is divided into small business flows-called module.Those modules are written in a library file as a functions.
In the script level the high level business functions are called.They are linked with small module functions.more over this is a very simple approach over record and play back.Objective to make it modular is nothing but to make the script reusable.There are driver in the main script and modular functions are stubs.We create shared object repository for Modular Automation Testing.When Application is huge, Initial development may go high but later the development cost just go down. Maintenance is easy and straight forward.

What is Modular Framework in UFT/QTP?

As the name suggests, this is driven by Module. Now what is a module—well it is small independent scripts that performs a specific set of tasks.It creates an layer in front of the component and hide the components from a non technical user as well as application.
The small components are added up to build a large test set.

What is Component?
What is Component?

Say I need to log in to an application. So I will select the module –login.
This login module will internally call generic functions.
How …lets see,,
Login component will contain ..
1. open the url ….so login module will take input1- url
2. It will open a browser and navigate the url
3. Now it will write user name ….so the second input is user id
4. similarly password and 3rd input will be password
5. click on a button whose name is Submit.(This is bit tricky..instead of clicking on submit button directly..we can make a common function which will accept a title name and click)…so this will be my 4th input.

What is Modular Framework?
What is Modular Framework?

Here the flow is  controlled by the login module but originally done by individual functions. So it is a functional decomposition method aiming to do unit set of tasks. Each task has only one calling point and will have only one exit point with finite and definite outcome.
Modular way of dividing requirements will reduce the test building cost in the long run with higher re usability.
Modular Framework will have 3 to 4 layers.
namely:
1.Script layer
2.Higher level components
3.Lower level components
4.Common components

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
say…
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 …

READ  What is Software Testing?

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.
Common
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?

Step-1
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.
Sep-2
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.
Step-3
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.

Sometimes we use by pass logic or work around to make a testcase pass. This can give a false positive result. Actual bug can be hidden behind this. So make sure you workarounds are limited and well tested.Discussing about the automation scripts ,scenarios and what automation is actually doing may give automation team a better idea and understanding.This is also reduce the pressure on automation team. It will clear the road blocks.So communication also plays a vital role. So don’t be afraid of asking or questioning the area which you don’t know.

A significant benefit of hybrid framework is the ability to support multiple browsers,platforms and technology stacks. So take proper advantages of capabilities,object clesses and business classes.

To get success via hybrid framework, management support is not only necessary but also critical.but the expectation from automation should be realistic.Even though we are using a hybrid framework, the main objective should be to pick up a small testcases and automate.The small step forward will give automation and the underlying concept a huge boost.

In the hybrid framework, automation team can be divided into developers, executors(including report generators and analysis), functionality Automator, gatekeeper, reviewer etc.when the responsibilities are given as per knowledge level, the chance to excel with automation will go high.

We generally carried by the buzz words in the name of the framework. So migrating to a good framework may not be necessary for your organization if the current one is doing just great. So better not to reinvent the wheel or don’t change it until it is broken.

BPT Framework:

Architecture of B.P.T framework
The architecture of B.P.T framework
BPT stands for Business Process Testing.It is a component driven framework where each business flow or sub section of a flow is represented as a component.BPT allows non technical persons,subject matter experts to quickly create test scripts and execute them.

Linking the components are inbuilt,getting dataset is also inbuilt,hence it is very easy to configure. BPT can only be used if we have Quality Center(HP test planner).We need to purchase BPT license apart from UFT and Quality Center(HP Test planner).

The “BPT” is the first web-based test design software. Mercury (nowadays HP)’s the best approach towards test automation project is to keep SME’s busy by designing automated script while the test automation engineers are busy with the coverage.

Business Process Testing is a summation of flows. And flows are divided into components.
in our traditional BPT framework automation is divided into two halves.

  1. one is to design the component(might be reusable or business based)
  2. to use them in a drag and drop manner and execute them

BTP are scenarios consists of several components. They are intended to design and verify a scenario. It is the big step forward towards shift left approach where business analysts get involved in the testing process very early of the test life cycle.

In BPT, we create business components and add/stitch them into a business process test. One business component is to test a single business action that performs a specific task in the business process.

The basic block of BPT:

  • Business Process Test
  • Business Specific flows
  • Application Area
  • Component

Business Process Test:

This section is the main flow decider. It may consist of several flows inside.

Flow:

The second level of BPT framework. We are going towards definite flows from BPT’s abstraction. Flows are an aggregation of components.

Application Area:

To enable a flow we need to define the Application area. It is the storage or place holder of underlying components.So application area acts as a container.Object Repository, Excel, test data, recovery scenarios, and lib, etc will be placed here in order to work with Components with respect to the flow.

Components:

Most Components are written in Vbscript, majorly reusable components. They are the lowest level of concrete things that interact with UAT. Components take data and other supporting files from the Application area in order to work under a flow.

A component is the smallest set of code which does a specific task. You can say a unique functional element which cannot be subdivided. We try to maximize the usability of the component so that it can be reused at a different level. Test Process is the collection of such components.

A component is a summation of some reusable code or in advanced BPT these are the only human readable keyword. It can be functions or actions or code.

Design of BPT
Design of BPT
On top of this, there are libraries available, Such as
  • Project Specific lib–Flows that are common only for a specific project
  • Navigation lib—A small set of functions that reads from the data table and handles navigation related queries
  • Environment lib–Details of the environment are passed from here
  • Common lib—Set of functions common across Projects.

Say–Do_login it is a small unique functionality of any application. It can not be further divided into pieces.
So it is an example of Components. Now, what is inside of components–some set of codes or a keyword structure that performs User Interface related activities. There it might call the Navigation lib to perform Navigation to a certain portal.
Example of Keyword-

textfield–id–set text-“abc”
textfiled–password–set text–“XXX”
button-Submit-press

Example of full component Do_login
for this login components, we need to initialize first then load the component

READ  How To Create Test Data for Advanced Test Structure or Test Framework

this URL will come from the navigation library
Again the launch_Browser is a common function will come from the common library.
After login, there might occur two scenarios.

  1. Successful login
  2. Failure login
There must a checkpoint to check the login operation
So the algorithm for component development is…
  • LoadComponent(Coponent_Name)
  • Call launch_Browser(URL)
  • textfield–id–set text-“abc”
  • textfiled–password–set text–“XXX”
  • button-Submit-press
  • Validation of login code
  • Unload Component

Role of SME in BPT:

  1. Define the Business process
  2. Define the flow
  3. Ask for components
  4. Once the components and Application area available stitch the components to create a flow.
  5. Execute the test cases
  6. Report

Role of Automation Engineers in BPT:

  1. Look for flows
  2. Define and design application areas
  3. Define OR files and Library files
  4. Support on demand the SMEs to validate the flow.

The architecture of BPT:

So it can be told that BPT framework is a three-tier architecture. where the first tire is for higher management who look after the requirements vs testing. Management can report and assign a test,
The second tire is for automation test engineers who design the components. The major advantage of this framework that the automation test engineers do not need to know the functional flow. So they can create a component, create function library and create the Object Repository.

Architecture of B.P.T framework-layer
The architecture of B.P.T framework

and the last tire is for SMEs who design the test. They can select components by drag and drop. They can configure the input as many possible combinations as possible. The can debug the test plan. They can add/delete the test plan. Most importantly they can execute.

Example of BPT Design:

The first part(the light blue part of the picture) is done by the Automation engineers. in this part automation engineers design functional library, create necessary object repository files and finally create components.
Say I need to automate

  • login to the portal
  • create customer

So automation engineers create a component called Login. This login will use two common functions…

  1. editing a text filed for id
  2. editing a text filed for password
  3. click on a submit button.

Again for the second component, they create Create_customer

  1. editing a text filed with the name
  2. edit a text filed with address
  3. also editing a text filed with ph no
  4. click on a submit button.

These functions will come from function libraries. Function library might be divided into two halves–

  • Pure business library
  • Pure common function library

They will upload these components in Quality center.
Now the SME’s will create a test(light red part of the picture). Take these components in drag and drop manner and design the same. They will configure the input and output file as a set of data. Then they will run this test from QC. After the successful test run, they will go to the output file and will validate the result.

Advantages:

  • Very easy for SMEs to create and test flows using the power of Automation.
  • Shift left approach- hence test can be written very early in the cycle.
  • Very good engagement tool that gives birth to Agile concept.
  • Easy component link, flow stitching, and test data providing interface provides great speed for testing

Disadvantages:

  • It is not free. It needs a license from HP. Hence it is costly.

6 latest frameworks:

Many gurus believe that manual screening is the ideal way to check out the merchandise and detect all glitches. Nonetheless, these days this strategy is not plenty of, because of the quick-modifying IT alternatives and new, much more advanced units.

Normally, a good deal of time must be sent in purchase to clear away the bugs and glitches, concealed in the PHP code. In this case, automated screening may perhaps turn out to be a true rescue for a tester or programmer who wishes to completely debug the process.

Fashionable approaches of the code crafting presuppose that a developer plays the part of a tester and execute software tests right after every single prepared strain. This is an excellent practice, primarily when it comes to a massive programming undertaking when there is no space for error.

Nowadays the builders, ahead of starting to publish the procedure code, build the check code in order to verify irrespective of whether the program operates effectively. This may possibly considerably help you save each time and funds which will be even further put in for the duration of the progress cycle.

There are two well-known approaches which are utilized for the duration of automated tests:
  1. TDD (Exam-Pushed Advancement) – entails standard PHP code and demands programming competencies
  2. BDD (Actions-Pushed Enhancement) – presupposes application of the lexical representation of info, easy to understand for any individual.

The “BDD” is intended to check the anticipated result of the uncomplemented functionality when TDD only reveals what need to be tested. BDD is valuable when the customer desires to “join” the advancement process and examine the development.

Definitely, automatic testing has a considerable total of assistive tests frameworks. Enable us to think about some of them.

What Are the Frameworks for Profitable Automatic Screening?
  • Codeception – has a jurisdiction to combine with the improvement frameworks, these as the Zend Framework, Yii or Symfony2 and permits producing practical, acceptance and device exams.
  • PHPUnit – makes certain the TDD method by the command line and helpful TestCase course and device screening.
  • PHPSpec – a good instance of the BDD method execution which presupposes composing documentation right before proceeding to the take a look at method.
  • Peridot – a basic framework, equipped with the reporters and plugins, consists of information-driven architecture.
  • Kahlan – with a smaller code foundation, it enables a tester to quickly write the unit tests by using explain-it syntax.
  • Selenium – a very helpful framework for acceptance screening as it may perhaps check out the process completely. Also, it may totally simulate the actual user actions.
Ultimately, it is important to be aware that, despite the noticeable pros of automation, its software does not signify beta screening alternative.

few Guidelines while designing the framework:

1.DO version control(use CVS,SVN).
2. Try to make the script Environment neutral.
Read More here for speed up automation with file size. Even Object Repository can be a nice part of Automation. How? Click here to learn more

What is SMAC Framework?

What is smack framework
What is smack framework
In present-day digital planet, if a customer is at the coronary heart of an enterprise, technological know-how is at the heart of internet marketing initiatives. No make a difference how good your product or service or option is, it rarely helps make any feeling, what helps make feeling is, holding tempo with customers’ anticipations.

In new decades consumer anticipations are increasing quicker due to the fact of the digital revolution. Shoppers now have a lot more choices than right before, many thanks to the fast-changing digital technological know-how developments.

The proliferation of clever phones and online applications even further lifted the bar. Digital people are quick embracing new technologies and adapting to it quickly.

SMAC Know-how

Social media, mobility, analytics and the cloud literally took the entire IT earth by storm. All these technologies in isolation have currently made their mark but the combination of these technologies was a marvel ready to unleash.

The convergence of these platforms is a disruptive innovation that will change the way the organization is executed. Today’s prospects are a lot more knowledgeable than ever prior to and they have a lot more alternatives and far more anticipations on when the place and how they interact and interact.

Social media

Social community world-vast penetration rate is quick escalating. It may well not come as a surprise that the amount of individuals accessing social networking websites is rising just about every working day. Many thanks to the consumerization of IT, the vast majority of social media consumers are now staunch followers of brands on social media, they routinely check out social networking sites to see if there are any new presents, rebates, and reductions.

These electronic natives take on-line critiques critically and now is the time for business to make online testimonials a priority. They regularly access social networking sites to find products and solutions and solutions. Research implies that this usage is bound to increase manifold in the potential.

There is minimal doubt that social media has transformed the way the businesses appear at the customer. It is higher time, corporations rise to the anticipations of electronic age customers. Businesses that have invested in these ubiquitous technologies have realized substantial measurable results.

Mobility

The entire world has gone cellular if the current trends are any indicator. The penetration and adoption of smartphones and other connected gadgets are rapidly expanding. It is hardly shocking that cell online usage price is radically rising many thanks to at any time-rising attractiveness of smartphones among all ages.

Cellular is ubiquitous and offers shops an exclusive possibility to provide customized client engagement. The capacity to swiftly engage customers on the go can make cellular advertising technique a harmless bet. Computerization of IT, World-wide-web of factors and BYOD is redefining the do the job setting and in lots of methods booting personnel productivity.

Analytics

Facts are continuously flowing in numerous formats and from a variety of sources (equally structured and unstructured). However, the info is readily available but the fact that it is not in a sought after structure can make it unusable for organization selection-producing. This is exactly where analytics will come into engaging in.

Analytics entails usage of systems, equipment and application to convert uncooked information into actionable information insights which can speed up selection-producing capacity. Business enterprise consumers can leverage analytical methods to achieve far more insights locked in facts.

Cloud

The cloud pretty much removes the need to devote greatly in components, computer software, and other infrastructure. Just one key gain corporations stand to acquire from the cloud is software-as-providers, which considerably lowers expenditures incurred on pricey details facilities. The cloud will help supply unified consumer experience.

Though each individual these technologies independently presents quick measurable enterprise benefits to businesses but integrating them as a stack( SMAC stack framework ) can develop new prospects for products advancement, buyer engagement, and conversation.

ref-SMAC

Robot Framework Instruction – Introduction and Elucidation

Robotic Framework is a generic automation framework for acceptance of exam driven improvement and acceptance screening. Robot Framework Tests follows key phrase driven testing technique by employing tabular take a look at information syntax. The tabular examination details syntax is straightforward to use and can be uncovered by simply just checking out RFTraining Movies.

Robot Framework is independent of the operating technique and application. It is an open source software program that is unveiled below Apache License 2. and the libraries and equipment that it uses in the ecosystem also are open supply.

This framework was initially made by Nokia Networks and presently it is sponsored by RF Basis.

The online is flooded with various On the internet Robot Framework Training Tutorials adhering to which a single can use this framework as easily as possible.

Some essential properties of RF:

  • It facilitates uncomplicated to use tabular syntax to create t-cases in a uniform way.
  • It generates uncomplicated to browse end result experiences as well as logs in HTML format.
  • It has the means to create reusable increased amount search phrases from existing keywords.
  • It is independent of software and platform.
  • It gives a simple and person welcoming library API to generate custom made test libraries that can be implemented natively with both Java or Python.
  • Its modular architecture supports the development of tests for applications with a number of assorted interfaces.
  • It features very simple command line interface and XML based output documents for integration into the existing create infrastructure.
  • It supports the creation of info-driven t-conditions.
  • The set up it gives is t-scenario and exam-suite level.
  • It delivers tagging for categorizing and selecting take a look at conditions that are to be executed.
  • It has created in support for variables to allow screening in distinct environments.
  • It presents help for selenium for world-wide-web screening, jogging procedures, Java GUI testing, SSH, Telnet, etc.

RF follows keyword driven testing. What is the key phrase driven tests?

Search term pushed screening, also termed desk driven screening are the notions that are broadly used to software impartial automation. The tester has to acquire the facts table utilizing search phrases that are independent of the check automation framework or any other resource applied to run them for that explanation.

Benefits of RF:
  • Supports check editors line Vim, TextMate, Emacs
  • Supports Swing, WebTesting, Home windows, SWT, databases, GUIs, Telnet, SSH, and many others
  • In-depth logs
  • Independent check knowledge editor
  • More simple tabular syntax
  • Distant take a look at libraries and other plugins for Jenkins/Hudson, Maven, Ant, etc
  • Generic exam libraries
  • Obvious reports
  • Data pushed exam cases

The robotic framework is so functional that it let us you perform command line, web and GUI screening with simplicity. Other interfaces can be analyzed by employing self-produced libraries. One can use án functioning procedure together with SSH library for command-line tests. By using running method one can set up as effectively as configuring the doing work environment, take care of data files and program procedures.

Device Testing Automation- Device Simulation Framework

There are huge amount of devices available in the market for many different purposes like mobile,garden watering tool etc. It is a challenge to test the massive amount of devices in an efficient and cost effective manner.

Each device testing is impossible and not cost effective(Lab cost,cabling,physical device cost etc). Even getting engineers who will do connection with mobile and computers.

Testing error paths in driver code is a problem,as most drivers works on kernel mode. Here all softwares have access to hardware devices. So amy issue may break the system (even a simple unhandled message). Do you remember the dreaded blue screen of death??Even though the driver code contains a huge proportion of error checking code,but testing these error paths are extremely difficult.

Till now developers played a big role in testing. So while debugging they try to find out bugs and fix them. Many paths which may contain errors go undetected to production as untested.

As I said that testing devices are huge challenge.Creative test engineers tried to get knowledge about targeted customer details and device performances. Accordingly,they have taken few devices and tried to test them with the recent advancement of technology and testing tools. But automation of those devices are still a pain.Device testing matrix are huge and growing in a rapid pace.

Fault Injection

The process of simulating error in hardware in order to test error path. It was nearly impossible and manual team could not test most of the error paths.A classic example of error injection is to unplug the USB.

Invention of Simulator

The main idea behind simulator was from Microsoft developer-Peter Shier in 2001 who thought Simulation of hardware with software.His idea if implemented correctly,the operating system will not be able to judge actual device and simulator.

We must choose a test automation tool where we know the tool beforehand. I mean that a strong knowledge base is present.(Say our team is full of UFT engineers so choosing UFT over other tool). This will give more productivity in less time.

How to start device automation?

A beautiful way to start regression suite is to add bug fix automation.When automation enables tests of previously untested areas,new bugs may come out.

Share and Enjoy !

20 thoughts on “What is an Automation Framework?”

  1. Anish @ www.automationrepository.com

    Hi,

    Nice article. You can also check the below link for more information on different QTP Tutorials. The articles also provide the download links from where you can download the sample scripts for reference.

  2. Valuable info. Lucky me I found your web site by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.

Leave a Comment

Your email address will not be published. Required fields are marked *