Software Testing

Software Testing Automation Framework

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Software Testing Automation Framework Overview

Automation in software testing can be achieved by using many tools.Here I would like to explain automation frameworks for selenium.Selenium is a web application automation tool.Selenium supports only application which has document object model.Selenium supports multiple languages like Java, JavaScript, python, ruby, etc.
Software Testing Automation Framework Overview
Selenium was released in the market as IDE(Integrated Development Environment) in 2004.It is record and playback tool.In 2006 second version of selenium released known as selenium RC(Remote Control).In 2007 selenium web driver is released which contains both functionalities of RC and / IDE.Selenium web driver comes as an API.

To download Selenium JAR file go to the following website:  

Software Testing Automation Framework

A framework is a set of rules for an automation engineer used to achieve optimized scripting.A “Software Testing Automation Framework” is used to provide an execution environment for the automation test scripts. The software testing automation framework provides the user with various benefits that help them to develop, execute and report the automation test scripts efficiently.

There are different types of software testing automation frameworks for selenium.Some of them are: 
  • Data-driven framework  
  • Modular driven framework 
  • Keyword driven framework
  • Hybrid automation framework 

Data-driven framework

Software Testing Data-driven framework

Data-driven framework Overview

The main aim of the data-driven framework is driving data from an external component like Excel, property file, or any database.

Rules for the data-driven framework

Every scenario in test case will have a separate sheet in Excel. The sheet will have test data required only for that scenario or test case.

Data-driven framework - Base state

In automation, if the application is not accepting duplicate data, every automation engineer should achieve a base state or zero states. 

Example: If application URL lands on a login page, every test should start with a login page and ends with logout. The data used for the test during the test execution should be removed before we go log out. 

Modular driven framework

This framework divides the entire testing application into some logical and isolated modules. For each module, a separate and independent test script is created. Thus, these test scripts together build a larger test script representing more than one module.
Software Testing Modular driven framework

Thus, these test scripts together build a larger test script representing more than one module.If the changes are done in one part of the application, only the test script representing that part of the application needs to be fixed, leaving all the other parts untouched.

Let us consider an example of Gmail application.Here Login page is viewed as a test script where all the login related actions are stored like username, password, submit button, etc.the another test script will be for compose module. Likewise, there will be many modules each separate for different functionality.Thus any changes to one module do not affect the other.All modules work independently.Here identification of bug may be a tedious task.The test data is hardcoded in the scripts.

Keyword-driven Framework

This type of functional automation testing framework is also referred as table-driven testing or action word based testing.In Keyword-driven framework, we use a table format, usually a spreadsheet, to define keywords or action words for each function that is to be executed. It also suits a non-technical tester.Keyword driven framework allows automation to be started earlier in the SDLC even before a stable build is delivered for testing.But in this framework, the initial investment in developing the keywords and its related functionalities might take longer.

Software Testing Keyword-driven framework

Keyword-driven testing usually reduces the sensitivity to maintenance caused by changes in the application under test. If screen layouts change, or the system is migrated to another OS hardly any changes have to be made to the test cases.The keyword documentation is changed, thus one document for every keyword, no matter how many times the keyword appears in test cases, and it implies an in-depth process of test design.

In keyword driven testing, the tests can be executed by anyone due to the detailed description of the way of executing the keyword. Further, the keyword details are provided in the documentation.

The keyword-driven framework is an open and extensible framework that unites all of the tools, assets, and data. Under this single framework, all participants in the testing effort can define and refine the quality goals they are working toward.

Hybrid Driven Framework

It is also known as hybrid automation framework.Hybrid automation framework consists of two or more combinations of different framework.It provides us the benefit to design framework based on our requirement.A combination of the Data-Driven and Keyword-Driven (or Modular-Driven) frameworks is commonly said to be a Hybrid-Driven framework. In general, a Hybrid-Driven framework is a collection of two or more frameworks that can be customized and accessed by any user.Consider an example, a framework with a combination of PageObjects, a Keyword-Driven framework, a Data-Driven framework, an object repository, and reporting listeners provides a powerful Hybrid framework.

Let us consider an example of Gmail app again.If I design hybrid framework to automate this app, the different users may be used.Thus stored in excel sheet(consisting of many usernames and passwords).Here Data-driven testing comes into the picture.Every functionality is considered as a module, is "Compose" is one module, "Inbox" is another, "Login" is another module.Thus the modular driven framework is used.The above example gives the idea of the hybrid-driven framework.Hybrid driven framework provides with the benefits of multiple frameworks.

Software Testing Hybrid driven framework

At present, we can find some open source already designed frameworks in the market.They are ready to use with defined generics and libraries.Some of them are Sahi, Gauge, RedwoodHQ, Serenity, Galen Framework, Robot.We can choose any one of them based on our requirements.


Software Testing Conclusion

Software testing automation framework helps to achieve stable application within less time.The frameworks described above are automation frameworks for selenium which are used commonly in testing with selenium. There may be other frameworks also which are not mentioned here. The tester chooses the type of framework based on their requirements.