Testing Frameworks – An Overview

What is a Testing Framework?

A testing automation framework is an overall system in which the tests will be designed, created and implemented. It also includes the physical structures used for test creation and implementation, as well as the logical interactions among those components.

Need of Testing Framework

If a group of testers is working on a same or different project and each tester is applying their own strategy to automate the application under test, then the possibility of duplication is higher. Also, the time taken to understand the whole strategy will be high. So we need an environment which should be independent of application and has the capability to scale as per the application under test. For this purpose, we use a testing Framework.

The Testing framework is responsible for:

  • Designing centralized and standardized logging facility, resulting in self-documenting test output
  • Creating a mechanism to drive the application under test
  • Creating a mechanism to execute the tests
  • Creating a mechanism to Report results

Advantages of having test frameworks:

  • Improved code re-usage
  • Reduced script maintenance
  • Independent of application under test
  • Easy Reporting
  • Modular Based Testing Framework
  • Data Driven Testing Framework
  • Keyword Driven Testing Framework
  • Hybrid Testing Framework

Types of Testing Framework

  • Modular Based Testing Framework
  • Data Driven Testing Framework
  • Keyword Driven Testing Framework
  • Hybrid Testing

MODULAR BASED TESTING FRAMEWORK

The module is a small independent script that performs a specific set of tasks. It creates a layer in front of the component and hides the components from a non-technical user as well as application. The small components are added up to build a large test set.

Test script

Advantages:

  • Fastest way to generate script
  • Modular division of scripts leads to easier maintenance

DATA-DRIVEN FRAMEWORK

In Data-driven framework, test input and output values are read from data pools, DB sources, CSV files, Excel files, DAO objects, ADO objects etc. Navigation through the program, reading of the data files, and logging of test status information are all coded in the test script.

Advantages:

  • Data sheets can be designed while application development is still in progress
  • Reduces data redundancy
  • Data input/output and expected results are stored as easily maintainable text records in database
  • Changes to the test scripts do not affect the test data
  • Test Cases can be executed with multiple sets of data

KEYWORD-DRIVEN OR TABLE-DRIVEN TESTING

The keyword-driven framework requires the development of data tables and keywords which are independent of the test automation tool used to execute them, and the test script code that “drives” the application-under-test and the data. Keyword-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.

There are 2 basic components in Keyword Driven Framework viz. Keyword, Application Map.

Keyword or Action

Keyword is an Action that can be performed on a GUI Component. Ex. for GUI Component Textbox, some keywords (action) would be InputText, VerifyValue, VerifyProperty and so on.

Application Map or Control

An Application Map provides Named References for GUI Components. Application Maps are nothing but ‘Object Repository’.

HYBRID TEST AUTOMATION

The most commonly implemented framework is the best combination of all the techniques. It combines Keyword driven, modular and Data Driven frameworks. Hybrid Testing Framework allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture. The framework utilities can make the data driven scripts more compact and less prone to failure. Tests are fully scripted in a Hybrid Testing Framework thus increasing the automation effort. Hybrid Testing Framework also implements extensive error and unexpected windows handling. It is used for automation of medium to large applications with long shelf life.

FuncLib2

Advantages:

  • Fastest and less costly way to develop the automation scripts due to higher code re-usability
  • Utilizing a modular design, and using files or records to both input and verify data, reduces redundancy and duplication of effort in creating automated test scripts


Leave a Reply

16 − eleven =