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 ...

Get Cucumber Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.