This project is the outcome of my self-learning about the API Testing Automation framework - Rest-assured. I heard a lot about Rest-Assured and how it made the QA's life easier by helping them to run all the tedious API tests in an efficient way. Hence, I started learning about the framework and have documented all my learnings in this repository with all example code from writing basic tests to running end to end API automation tests.
- This repo contains example codes of API Tests using Rest-Assured.
Hamcrest Matchersare used for assertions.- TestNG Listeners are used to capture the events in logs.
Log4jis used to capture logs.- Lombok is used to generate Getter and Setters automatically for post body requests.
- {REST-API} READY TO USE APIs is used for testing.
- End to End scenarios have been added for the restful booker APIs.
- Restful E-Commerce - A A simple Node E-Commerce application for testing RESTful web services. This application is built for testers to practice API Testing.
You will get the answers to the following questions and its respective working code example with rest-assured framework in this repository:
- How to write tests for
Getrequests? - How to write tests for
POSTrequests? - How to write tests for
PUTrequests? - How to write tests for
PATCHrequests? - How to write tests for
DELETErequests? - How to handle the
authenticationrequests? - How to write tests for
SOAP APIrequests? - How to verify the Response Body?
- How to verify the Response Status Code?
- How to verify the Response headers?
- How to extract value from Response Body?
- How to perform assertions using
Hamcrest Matchers? - How to create
POJOfor passing values to request body? - How to use
Lombokto generateGettersandSetters? - How to use
Lombokfor writing the builder pattern code? - How to use Builder Pattern for test data generation using Data Faker?
- How to write end-to-end api tests?
- How to perform
JSON Schema Validation?
- What is API Testing?
- End to End API testing using rest-assured
- How to perform JSON Schema Validation using Rest-Assured?
- API Testing using RestAssured and OkHttp
- How to Test POST Requests with Rest-Assured Java for API Testing: Part I
- How to Test POST Requests with Rest-Assured Java for API Testing: Part II
- How to test a SOAP API request with Rest-Assured Java
- How to Perform Response Verification in REST-Assured Java for API Testing
- How to use Java Records to serialize JSON API requests
- How to Test a GET API Request using Rest-Assured Java
- How to Test PUT API Request using Rest Assured Java
- How to Test a PATCH API Request with Rest Assured Java
- Data Driven API Testing in Java using Object[] with Rest-Assured and TestNG
- Data Driven API Testing in Java using Iterator with Rest-Assured and TestNG
- Data Driven API Testing in Java using CSV files with Rest-Assured and TestNG
- Data Driven API Testing in Java using JSON files with Rest-Assured and TestNG
- Data Driven API Testing in Java using Excel files with Rest-Assured and TestNG
- Discuss your queries by writing to me @
mohammadfaisalkhatri@gmail.comOR ping me on any of the social media sites using the below link:
- Contact me for Paid trainings related to Test Automation and Software Testing,
mail me @
mohammadfaisalkhatri@gmail.comor ping me on LinkedIn



