O'Reilly logo

Cucumber Cookbook by Shankar Garg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a REST Automation framework

HTTP Client is an open source REST services library developed by Apache. I am using HTTP Client for this framework because this is a pure Java implementation and is very easy to use. We need to create an instance of the HTTP client and then just use one of the already defined functions.

Since there is no UI involved and there is a limit to the functions that we need to use, there is no need for the POM in this framework. Let's learn how we can create a robust REST automation framework using Cucumber and HTTP Client.

Note

I am just giving a demo of REST Services automation, the same project and framework can be used for SOAP automation as well.

How to do it…

Let's first understand the test case that we will use in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required