Giter VIP home page Giter VIP logo

restfultesting's Introduction

restfultesting

Project to help QA engineers understand the REST API services' testing. REST stands for "REpresentational State Transfer".

Time for some basics first.. Grab some coffee and start reading.

What is REST Client:

A method or a tool to invoke a REST service API that is exposed for communication by any system or service provider. For example: If an API is exposed to get the real time traffic information about a route from Google, the software/tool that invokes the Google traffic API is called the Rest client.

What is REST Server:

A method or an API that is exposed for communication by any system or service provider. For example: Google expose an API to get the real time traffic information on a given route. Here, the Google server needs to be up and running to listen to any requests to the exposed API, from different clients.

Lets establish a complete E2E scenario from the above examples.

Scenario:

Lets consider a taxi booking application like Uber. Uber needs the real time information on the traffic situation in and around the routes that their vehicles travel.

a. Rest Client:

Here the client is Uber web or mobile application. This app sends a request the Rest API exposed by the Google maps to get the real time data. For ex: A HTTP GET request

b. Rest Server:

Google's Server with endpoint exposed. In this example, Google is the Service provider. Google responds with the required details to Uber app's request.

Apparently, both the client and server are equally important in REST communication. Hence, I have implemented examples for automation testing of both REST Client and Server.

This project contains source and test modules for validating RestClients and RestServers. As QA engineers, the Source code is not of much interest to us. However, look at it for reference.

Frameworks used:

Basic Java constructs

Junit (Can be replaced by the mighty and simple TestNG)

Restito (com.xebialabs.restito)

Apache httpclient (org.apache.httpcomponents)

RestAssured (com.jayway.restassured)

Disclaimer: Please note, this is not a framework for your rest services' testing. But I am positive that this will help you understand the details on how to use different frameworks to get your RestFul services tested, seamlessly.

restfultesting's People

Contributors

cham6 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.