Skip to content
No description, website, or topics provided.
Java Gherkin Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

LIPPIA API Example Project

System Requirements :

Docker stack

The following project includes the basic Docker Lippia Containers to run this web sample project. You can choose to run the code from your favourite IDE, run from console or from Jenkins using the Docker Stack. To install and start a local instalation with Docker containers go to Getting started at the end of this guide.


The following project has the purpose of demonstrate and let test automation developers to to test API requests using Lippia Automation Framework based on Rest Client library. This sample project includes the required components as binaries, docker containers and configuration files to simply download and run a set of sample tests in your local computer, using the Lippia container stack described bellow.

Getting started

Executing tests in you local machine

  • go to root project folder and you will find a pom.xml file
  • run the following command :
mvn clean test

Project structure

A typical Lippia Test Automation project usually looks like this

├── main
│   ├── java
│   │   └── com
│   │       └── crowdar
│   │           └── api
│	│				├── config
│	│				│	├──
│   │               ├── model
│   │               │   ├──
│	│				│	├──
│   │               │   └──
│   │               └── services
│   │                   └──
│   └── resources
│       ├──
│       ├──
│       └──
└── test
    ├── java
    │   ├──
    │   ├──
    │   └──
	└── steps	
	│   └──
	└── apiExampleProject
    │           ├──
    └── resources
        └── features
            └── ApiExample.feature
		└── jsons
            └── createUser.json

Folder's description:

Path Description
main\java\...\examples\model\*.java Folder with all the Mapped Objects matching steps with java code
main\java\...\examples\config\* Folder with all the Settings wich match with Gherkin Test Scenarios
test\resources\features\*.feature Folder with all the feature files containing Test Scenarios and Sample Data
main\resources Folder with all configuration needed to run Lippia

In this example, ApiExample is the first endpoint the framework will interact with. The steps defined in to execute the Test Scenarios defined in Gherkin language.

File Description Model: you can declare every attribute expected on the responses that you want to interact with. You need to add one new file for each response you want to model in your tests. StepOpject: Code to support the behaviour of each step coded into the feature files for the User endpoint. This code executes the interaction between the Framework and the api endopoint and match the steps with the code who run interactions.
ApiExample.feature Feature file: Definition of the Test Scenarios with all the steps written in Cucumber format (http)

Model Object Example

In the model examples you can mapped the expected objects from different api responses. We can show you a little example:

    "data": {
        "id": 2,
        "email": "",
        "first_name": "Janet",
        "last_name": "Weaver",
        "avatar": ""

So the model class will be something like this:

   public class User {

    private int id;
    private String email;
    private String first_name;
    private String last_name;
    private String avatar;

    public int getId() {
        return id;
    public void setId(int id) { = id;
    public String getEmail() {
        return email;
    public void setEmail(String email) { = email;
    public String getFirst_name() {
        return first_name;
    public void setFirst_name(String first_name) {
        this.first_name = first_name;
    public String getLast_name() {
        return last_name;
    public void setLast_name(String last_name) {
        this.last_name = last_name;
    public String getAvatar() {
        return avatar;
    public void setAvatar(String avatar) {
        this.avatar = avatar;

The idea is have one attribute per field to map on the response

Lippia Architecture

Lippia Architecture API

Scenario Example

Lippia Scenarios Example API

The scenarios can be written using BDD methodology.

Given as a precondition

When as actions

Then as validations

On each declared step you can insert the calls defined from service classes

Json Structure for request data

This project use json to manage request data like url parameters, body data, headers and url endpoints. The following picture shows the structure of the json

Lippia Scenarios Example API

Extent Report

This project like all lippia products uses Extent reports that shows the status of each test run. This report also describe stadistic data for the total number of tests and the status of those

Lippia Scenarios Example API

Requirements :

Getting started

You can’t perform that action at this time.