Giter Site home page Giter Site logo

anshul-sonpure / restassured_tutorial Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 497 KB

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.

Home Page: https://medium.com/@theautobot/rest-api-and-rest-assured-tutorial-understanding-and-implementing-restful-web-services-33fd5659a09a

Java 3.35% HTML 96.65%
apitesting bdd-tests rest-api restassured restassured-framework

restassured_tutorial's Introduction

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 :)

restassured_tutorial's People

Contributors

anshul-sonpure avatar

Stargazers

 avatar

Watchers

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