An Overview of Testing Frameworks

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 and the logical interactions among those components.

Need for Testing Framework

If a group of testers is working on the 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 that should be independent of the 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 a 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 testing frameworks:

  • Improved code re-usage
  • Reduced script maintenance
  • Independent of an 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 non-technical users as well as applications. The small components are added up to build a large test set.

Test script

Advantages of Modular-based Testing Framework:

  • The fastest way to generate a script
  • Modular division of scripts leads to easier maintenance

Data-Driven Testing Framework

In a 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 the data files, and logging test status information are all coded in the test script.

Advantages of Data-Driven Testing Framework:

  • Datasheets 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 the 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 Framework

The keyword-driven framework requires the development of data tables and keywords that 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

The 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 Testing Framework

The most commonly implemented framework is the best combination of all the techniques. It combines Keyword-driven, modular, and Data-Driven frameworks. The 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 the automation of medium to large applications with long shelf life.

Hybrid Testing Framework

Advantages of Hybrid Testing Framework:

  • 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

Have questions? Contact the software testing experts at InApp to learn more.