LayoutTitle

Hoverable Dropdown

Automation Frameworks

Introduction

The ideology of the automation framework should be equal standards for any of the automation tool you select. It should not be a different from client to client or place to place or tool to tool. Hence, one should understand that the basic principle behind automation framework for both Selenium & UFT are very simple and flexible. To understand more deeper on framework then question yourself using 5WH principles. 



Here you go....
  1. What - Automation Framework
  2. Why - Automation Framework
  3. When - Automation Framework
  4. Where - Automation Framework
  5. Who - Automation Framework
  6. How - Automation Framework

  • What - Automation Framework

A framework is a designated/designed common template with set of defined rules across organization and one should comply to those rules to achieve a common or single result. According to the need of requirement or complexity of the application design the automation framework with different fashions. Those are namely.


  1. Linear Framework
  2. Module Framework
  3. Data Driven Framework
  4. Keyword Driven Framework
  5. Hybrid Framework 
  6. Behavior Driven Development Framework (BDD)

  • Why - Automation Framework

When everyone is expert then there are chances of piece of code in different formats or fashions, to avoid duplicates or inconsistency coding or standards. Hence, better to have a unique platform where everyone will follow the same and have high visibility in terms of coding quality too.

  • When - Automation Framework

At the first phase automation test process during feasibility study itself one should get complete picture about application being under go testing. Once you have complete visibility on entire application then it will be very easy in identifying reusable functionalities with SME concurrence. Thereafter, segregate the features and divide them according to the framework that suits and in turn increases the automation test coverage.

  • Where - Automation Framework
Where ever the software application being tested to scale quality of the developed site each project should have automation process in place. In order to reduce the cost and reduce cycle time of the execution time automation plays a vital role here. In reaching the project management goals or to meet the requirements and to have the maximum test coverage based on the complexity of the application being tested better to use multiple frameworks wherever possible to increase the test coverage. If we stick any one good framework that covers majority of the functionality the test coverage will be very less; by looking into these scenarios try to mix up different frameworks by having no dependency on the reusable components or functions in place.
  • Who - Automation Framework
To derive the good framework with no dependency on the reusable components or functions all the stakeholder of the project has to involve since the start of the project to closure of the project to achieve the success of the automation usage.

  • How - Automation Framework

Clearly explained how different frameworks can be used according to the convenience of the scenarios you derived. One thing you have keep in mind that once decided to one framework it is very difficult in case your decision was wrong post to the automation code development.

Types of Frameworks

  1. Linear Framework
  2. Module Framework
  3. Data Driven Framework
  4. Keyword Driven Framework
  5. Hybrid Framework 
  6. Behavior Driven Development Framework (BDD)

1. Linear Framework - Linear Framework is a basic level test automation framework which is in the form of 
  1. ‘Record and Playback’
  2. Drag & Drop of each object from Object Repository
  3. Type Browser and then type "(", then UFT populates the Browser you added in Object Repository and then continue finishing the line of code.
  4. Using Step Generator
 Example: 


2. Module Framework - Module Framework is a collection of lines of code bind together as a block or procedure or function or action when you feel that block of cope can be used else where as a reusable in the application that you are developing automation. Also, simply you can say combination of different set of modules (individual scripts or functions or actions) binding together as a single Master/Driver Test Script.

Example
Master script 1 uses three modules say 2,3 &4 and so on as shown in the below snap.



3. Data Driven Framework - Allow us to build the code more dynamic with respect to the code that built and provide facility to reuse the same code to be tested multiple times the number of test data that you key in to the framework. The test data may associate via excel sheet, MS access, Oracle server, XML files etc.,

Example 1: As mentioned, each test case might have individual test data (Consider each Test Case as a master script).


Example 2: Generalize based on the scenario, same master script can be utilized with different multiple test data and categorize them as single test case.



4. Keyword Driven Framework - Keyword Framework works as data driven framework in addition it also fetches the code to run based on the logic/data provided in the test data sheet. Here, based on the data provided in the test data sheet, the respective.

Example: Automation script not only takes the value from the sheet, based action written in the sheet the respective code will get executed automatically. (Considered each row as a single test case. If you want to take 5 rows as single test case then provide TestCase1 in first row under TestCaseName column and in the 6th row put a EOF (End of File) as a delimiter to terminate the test case execution flow)



5. Hybrid Framework - Hybrid Framework allows the combination of one or more framework described here. The best thing being a complex projects or applications definitely will have mix of different functionalities, hence mostly may require the combination of one or more frameworks, hence majority test automation teams uses the Hybrid Framework itself.

The test data may associate via default DataTable or excel sheet or MS access or Oracle server or XML files etc.,



6. Behavior Driven Development Framework (BDD)The best in BDD is, the story or feature that will be written in English language with few Keywords (like Given, When, Then, And....) like format and easily understandable to all the stakeholders of the project (Vice President, Business Analyst, Product Owner, Scrum Master, Developer, Tester etc.,). There are different tools available for BDD like cucumber, Jbehave with which the automation tester do the automation part.

You need to familiar with the some of the verbiages given below for better understanding on the BDD Framework 




3 comments: