#1. |Rest Assured Framework|Points To Consider Before Developing Test Automation Framework|

Introduction

REST Assured is a Java library to test and validate REST services. I have already covered maximum Rest Assured concepts in different series on my blog and on my YouTube channel here. Creating tutorials on developing a Rest Assured framework from scratch is the next target that I am kicking off with this post.

I decided to create video tutorials on YouTube as it is more appropriate for learners. Reading concepts might confuse readers.

There are some factors about which we need to think before we create any test automation framework. These factors are common if you are creating a Web Automation framework or API automation framework. We will learn about those factors in this post.

What you will learn in this tutorial?

  1. What is called a framework?
  2. Factors to be considered for developing a framework

Youtube Tutorial Link

Must watch.

What is a Framework?

A framework consists of useful fundamental elements which eventually become shareable, reusable, and extendable over a period of time. A framework should be generic, not specific. Let’s understand this with an example.

There might be multiple projects developing REST APIs in a company. The testing team should develop an API automation framework to automate those APIs effectively and efficiently. If every testing team of different projects develops its own framework then it is time-consuming, repetitive work, and a waste of resources. There should be a base framework that can be shared and used across different teams doing similar work. Obviously, the base framework can be extended based on the application’s specific needs.

Factors To Consider Before Creating A Test Automation Framework

There are mainly three factors or points you should think about before creating a framework –

  1. Understand the problem statement
  2. Identify capabilities
  3. Tools selection

Understand the problem statement

It is not mandatory to know the application before you develop a test automation framework. You will be thinking about how it is possible. It is actually context-dependent.

If you are asked to create a Selenium framework using Java programming language then actually you are all set to create a framework. You do not necessarily need to see the application/s to be automated. For example, there are many organizations that only provide testing solutions. They develop solutions that can be used for specific third parties applications.

But if you are asked to create an automation framework for a web-based application then you can not select any web automation tool blindly. By inspecting a web application you may select different web automation tools. Here again, you need to create a generic framework that can be used for similar applications.

You don’t require locators to develop a framework. I have heard it from beginners and intermediates. Writing locators are not part of the developing framework.

Identify capabilities

You need to identify the capabilities provided by the automation framework to be developed.

A web automation framework must have –

  1. Easy launch of any browser of choice.
  2. Customized keywords to perform actions like clicking on a button, selecting a checkbox, handling a toggle button, typing in a text box, etc.
  3. Proper wait mechanisms.
  4. Generation of robust reporting after execution
  5. Parallel execution
  6. Utilities like reading data from JSON, Excel, CSV, etc.
  7. Capturing screenshots.

Similarly, an API automation framework must have –

  1. Easy to use methods to perform different HTTP operations like CRUD.
  2. Multiple ways of creating payload.
  3. Should support different types of payloads like JSON, XML, files, etc.
  4. Generation of robust reporting after execution
  5. Parallel execution
  6. Utilities like reading data from JSON, Excel, CSV, etc.

Above are high-level points which must be broken down further. For example, a robust test execution report must give details of executed tests with steps and validation performed. It should also include who has executed tests, the time is taken to run the whole suite and individual tests, some graphs, etc.

Tools selection

The final point is tool/s selections. Tools selection depends on the above two factors. From the first factor, you can select a programming language and automation tool. From the second factor, you can select supportive tools. For example, if you select programming language as Java and web automation tool as Selenium then for reporting you can select Extent Report or Allure report or maybe your own custom report.

Thanks for reading.

If you have doubts, feedback or suggestions please comment on this post or YouTube video. You can also send me a mail at amod.mahajan@hotmail.com or WhatsApp me at +91-8951525628.

Leave a Reply

Your email address will not be published. Required fields are marked *