Blog QA Touch

What is the Test Automation Framework?

March 26, 2020
What is Test Automation Framework

In General, no matter how big or small your project may be, post the requirement gathering, it will be decided how to split the requirements into multiple parts and sharing it with the team of developers among or across different departments, getting it developed and put it back together finally to make a whole again like how we used to put together the jigsaw puzzle.

Here we are getting the developed features of the product pouring in from disparate sources and streams so it is the standard procedure for getting some sort of validations, compliance, sequencing done to meaningfully analyze the developed product.

What is the Test Automation Framework?

A test automation framework is essentially a set of rules/guidelines for designing, planning and creating the test cases. It will make the testers use the resources more efficiently by following the conceptual part of automated testing.

Why is the Test Automation Framework needed?

These stakes often need a set of a predefined framework to get these tasks automated. The Test Automation framework will normally be preferred for reducing the time and effort taken and performing any reiterating steps in the testing process.
QA Touch
There are six common types of test automation frameworks, each with their own architecture and differing from benefits and disadvantages. When building out a test plan, it’s important to choose the framework that is right for you.

  1. What is the framework?
  2. Linear Scripting Framework
  3. Modular Testing Framework
  4. Data-driven Framework
  5. Keyword Driven Testing Framework
  6. Hybrid Driven Testing Framework
  7. Behavior Driven Development Testing Framework

What is a Framework?

A framework is a piece of software that provides a skeleton for your application. In simple words, a framework is a library that provides us with the generic things which are needed by all the applications.

Examples of Frameworks:
It may include the classes/functions which are predefined that can be used for processing the input, managing the hardware devices and to interact with the system software.

The major key difference between the library and framework is, when you use the library, you call the library’s code. In comparison, when you use a framework, it calls your code.

What is the purpose of a Framework?
Generally speaking, to make it easy for understanding a network of ideas in accessible terms.

What are the Components of a Framework?
The major components:

  1. Implementation Tiers.
  2. Framework Core.
  3. Profiles.

Linear Framework:
The approach of writing all the steps one after the other in a linear form is the linear framework. This approach is also called linear scripting. In this approach, the entire test case flow will be scripted in QTP in a linear fashion.

Linear Scripting:

It is a Keyword-driven approach. This approach is done by simple recording and playback of the record used by a test engineer to automate a test case/test flow of a system.

Modular Framework:

It is the approach of finding out the reusable flows from the analysis of all the test cases. Then these reusable flows are stored in external files as functions that will be called in the test scripts wherever required. This process is done while scripting.

It is like the creation of independent scripts that represent the sections, modules, and functions of the application which are under test.

Data-driven:

It is a test automation framework that stores test data in a table or spreadsheet format. In this framework, data files are used to read the input values which will be stored as a variable in test scripts. DDT (Data-Driven Testing) will enable the building of both positive and negative test cases into a single test.

Difference between Keyword driven and Data-driven framework:

Data-Driven Framework :
It helps the user to segregate the test script logic and the test data from each other. It lets the user use an external database for storing the test data.

Keyword Driven Framework:
It is a type of functional automation testing framework which is also known as Action Word Based Testing or Table-Driven Testing. First is calling the Test Step, second is to find the Object of the Test Step, third is making the action on the Test Object and fourth is getting data for the Test Object.

Keyword-Driven Overview:

This methodology approach uses the keywords or action words for symbolizing the functionality which needs to be tested, such as Enter Client. This keyword Enter

The client is defined as a set of functions that needs to be executed to enter a new client in the database. The keyword documentation would contain:

  • The SUT’s (System Under Test) starting state
  • The starting window or menu
  • The clicks of the mouse or keys to get the required data entry window
  • Names of the ‘fields to find’ and the arguments to enter
  • The required actions which need to be performed in case additional dialogs pop up (like confirmations)
  • The submit button click action.
  • A statement for the given state of the SUT once it got completed with the actions

Hybrid Test Framework:

It is a concept of the advantage of both the Data-Driven Framework and the Keyword. In this for keywords, we will use Excel/Spreadsheet files to maintain test cases, and for test data, we can use data providers of testng framework.

Hybrid Testing:
It is what most frameworks develop/evolve into overtime and multiple projects. The accommodation of both grammar and spelling as well as information input will make automation frameworks as successful. This will allow the given information to be cross-checked against the confirmed and existing information.

Hybrid-Driven Testing Pattern:

  • Maintainability – significantly reduces the test maintenance effort
  • Reusability – modularity of test cases and library functions
  • Manageability – traceability, execution and effective test design
  • Accessibility – To develop, modify & design the test while executing
  • Availability – It will make sure to run the scheduled execution on a 24/7 basis
  • Reliability – Advanced scenario recovery and error handling
  • Flexibility – Should be a Framework independent of environment or system under test
  • Measurability – Customisable reporting of test results that ensures the quality.

Behavior Driven Development:

BDD framework is an approach of software development that allows the business analyst/tester to create test cases in simple text language (e.g. a domain-specific language like Gherkin). This approach will be used in the scenarios that help to understand what is going on in the software project for non-technical team members.

BDD comes with the goodness of practices followed in both Test-driven Development and Acceptance Test-Driven Development cycles, to be clear, the former cycle is more oriented towards the hardcore developer regime and the later is oriented towards the business area to a certain extent. Now, this constitutes an approach for building a shared understanding of what kind of software to build by discussing examples.

Examples must be defined before starting the development and they are used as acceptance criteria. They are part of the definition of done.

Gherkin, basically a type of syntax used in BDD, allows the user to use a set of special keywords. This gives a structure and meaning to executable specifications.

The primary keywords are:
Feature
Background
Scenario
Given
When
Then
And
But

Test-Driven Development:
TDD is mainly focused to encourage the developers to write the units of code that meet the requirement. While the ATTD is designed to collaborate among the development, QA, and customers to ensure the well-designed requirements.

Principles of TDD:
Test-driven development is a software development methodology which essentially a software developer must:

  • Define a test set
  • Make the test set to fail
  • Then implement the unit
  • Finally, verify that the implementation of the unit which makes the tests succeed.

This definition is rather to be in non-specific terms so that it allows tests of high-level software requirements, low-level technical details or anything in between. This makes the BDD the continued development of the Test-Driven Development cycle which makes more specific choices than TDD.

Reference: https://www.tutorialspoint.com/behavior_driven_development/

Leave a Reply