Skip to content

This GitHub repo is for beginners and learners. It offers comprehensive tutorials and resources to make learning rest assured easy. Whether a beginner or experienced, the repo has something for everyone. Start expanding your coding skills now! I have written an article on the same do check the below article on medium.

Anshul-Sonpure/RestAssured_Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestAssured Tutorial

Hi All, This repository is for all those who want to learn API testing using rest assured.
In this repo I have written testscripts on how we can make GET,POST,PATCH/PUT and DELETE request in restassured for API Testing.
I have also covered some other testscripts like setting query,path and form parameters,how we can log data and how to do validation.
Also I have tried to cover an end to end flow for and API Testing.
Implemented Extent Report for Reporting,still working on enhancement for the
reporting part in extent-report.
In Repo you will learn how to make GET call, POST using map,POJO class,JSON Object,Json file, PUT/PATCH/DELETE request.
How to set query,path parameter and how to log header,body, cookies.
How to blacklist header being print on console.
How to upload and download file using api call.
How to Test asynchronous systems, using Awaitility which is a DSL that
allows you to express expectations of an asynchronous system in a concise and easy to read manner.

Features

  • Rest assured is java library for testing Restful Web services. It can be used to test XML & JSON based web services.
  • It supports GET, POST, PUT, PATCH, DELETE, OPTIONS and HEAD requests and can be used to validate and verify the response of these requests.
  • Also it can be integrated with testing frameworks like JUnit, TestNG etc.

Methods

HTTP methods (GET, PUT, POST, PATCH and DELETE) and these methods can be mapped to CRUD operations.

GET retrieves the resource at a specified URI.
PUT updates a resource at a specified URI. Also be used to create a new resource at a specified URI. Replaces the entire product entity.
PATCH support partial updates.
POST creates a new resource.
DELETE deletes a resource at a specified URI.

Error Codes

HTTP response status codes are grouped in five classes:

Informational responses (100–199),
Successful responses (200–299),
Redirects (300–399),
Client errors (400–499),
Server errors (500–599)

Installation

IDE - IntelliJ / Eclipse Version Control - Git Build tool - Maven,TestNG

Clone the repo

git clone https://github.com/Anshul-Sonpure/RestAssured_Tutorial.git

Build the project

mvn clean 
mvn install

To run the project either execute each testscript or

mvn test
  • Note: Please feel free to provide your valuable comments for making this repo better. Suggestions regarding the extent report part is most welcomed and much appreciated.

Thank You
Happy Coding,
Learn,Code and Earn
Stay Safe and Stay Positive :)

About

This GitHub repo is for beginners and learners. It offers comprehensive tutorials and resources to make learning rest assured easy. Whether a beginner or experienced, the repo has something for everyone. Start expanding your coding skills now! I have written an article on the same do check the below article on medium.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published