Creating Simple REST Test Automation Framework


In this blog post, I will show how to quickly set up a testing automation framework for REST API testing, using JAVA.


I will use a few of my favourite tools for this simple framework:

Example of a simple REST test using Serenity/RestAssured/JUnit :

public class SimpleRestFramework {

    private String url = "";

    @Title("Simple Serenity RestAssured Test")
    public void simpleRestGetTest(){



After you run this test case using JUnit, a report will be generated by serenity, the only thing that is left is to run this Maven command which will generate HTML 5 report summary (index.html):

mvn serenity:aggregate

This will generate a Serenity report which can be found in Target > Site > Serenity. This report contains a lot of useful information like request/response and steps that were executed.

Using this information you can start building a basic and simple REST automation framework with a great test runner and report building tool. This is basically all you need for REST testing using JAVA. Goodluck!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s