5 Key Types of Test Automation Frameworks

Aug 14
16:35

2019

Elise Lowry

Elise Lowry

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

What is a test automation framework and what is its role in the software testing process? Explore the different types that exist out there, along with their pros and cons.

mediaimage

A test automation framework is nothing but a set of instructions that define how a test case should be executed by the test automation tool so that one gets the desired results/outcome. Test execution is nothing but an action to be performed,5 Key Types of Test Automation Frameworks Articles and like many other actions that are defined by a set of guidelines, such as boarding a flight or scuba diving, there are certain pointers, which when followed, helps bring more accurate results, prevents errors and reduces chances of failure.

The guidelines that a test automation framework brings to the table include coding standards, treatment of object repository, data handling and the likes, which are to be followed during the scripting process. It is important to note that these are guidelines and are not compulsory for test case executions. You may choose to do away with them completely, but you’ll miss out on the benefits that a framework has to offer. Here are the 5 key types of automation frameworks commonly used in the industry.

1] Linear Scripting Framework

Also known as “Record & Playback”, it is the simplest form of test automation framework that exists. This framework involves manual recording of each execution step by the QA team, such as Navigation & User Input, in the very first round of testing. The subsequent rounds only involve Playing Back the recorded scripts.

Pros:

  • The quickest method for script generation.
  • Makes it extremely easy to learn about the tool.
  • Requires no prior automation expertise to be carried out successfully.

Cons:

  • Does not allow script reuse.
  • Maintenance can be a challenge.
  • Script has data hardcoded into it.

2] Structured Scripting Framework

In this framework, test scripts are initially recorded using the “Record & Playback” method and the next step involves identification & grouping of common tasks inside the scripts into Functions, which are used by the main test script to create test cases.

Pros:

  • Higher levels of reuse of codes.
  • Easier script maintenance.
  • Automation scripts less expensive.

Cons:

  • Expertise in automation is mandatory.
  • Preparation of test cases can be time-consuming.
  • Test data is hard-coded within the code.

3] Data-Driven Framework

In this framework, Test Case logic remains within the test script while the Test Data resides outside of it. Instead, it is read from external files and attached to the variables inside the Test Script.

Pros:

  • Test Script modifications do not affect Test Data.
  • Multiple sets of data can be used to execute Test Scripts.
  • Different types of scenarios can be easily executed.

Cons:

  • Planning and execution takes time.

4] The Keyword-Driven Framework

In the Keyword-Driven Framework, development of data tables and keywords is mandatory, and this applies to any automation tool that you may use for execution. It involves documentation of the functionality of the application to be tested in a tabular form, as well as in the form of step-by-step instructions. Most automation tools today, such as QARA Enterprise and Katalon Studio, are based on the Keyword-Driven Framework.

Pros:

  • Very high re-usability of the codes.
  • Independent of the test tool used.
  • Independent of the Application Under Test (AUT).

Cons:

  • Can be expensive.
  • Requires high levels of automation expertise.

5] The Hybrid Framework

Just as it is evident from the name, the Hybrid Test Automation Framework is a result of the combination of one or more of the frameworks we have discussed above, and it possesses the strengths and weaknesses of the frameworks that are combined together. Interestingly, most frameworks evolve into a Hybrid framework over the course of time, and after being used in multiple projects. The most common combination prevalent in the industry is that of the Keyword-Driven Framework and the Structured Scripting Framework.

Pros & Cons:

Depends on the frameworks chosen to create the Hybrid Framework.

Every test automation framework out there has its own set of pros and cons and which one you choose depends entirely on the requirements of your team. Knowledge about the many frameworks will help you make an informed decision when it comes to the choice of the right automation tool as different tools are based on different frameworks.