Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mfaisalkhatri/rest-assured-examples
Learn API testing using rest-assured framework.
https://github.com/mfaisalkhatri/rest-assured-examples
api-automation apitesting automation-test hacktoberfest learning-by-doing rest-assured test-automation testing testing-framework tutorial
Last synced: 2 days ago
JSON representation
Learn API testing using rest-assured framework.
- Host: GitHub
- URL: https://github.com/mfaisalkhatri/rest-assured-examples
- Owner: mfaisalkhatri
- License: apache-2.0
- Created: 2021-11-19T19:26:29.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T13:00:12.000Z (4 months ago)
- Last Synced: 2024-10-12T03:26:02.325Z (2 months ago)
- Topics: api-automation, apitesting, automation-test, hacktoberfest, learning-by-doing, rest-assured, test-automation, testing, testing-framework, tutorial
- Language: Java
- Homepage: https://mfaisalkhatri.github.io/rest-assured-examples/
- Size: 4.81 MB
- Stars: 182
- Watchers: 12
- Forks: 79
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-learning - Rest Assured Example code
README
[![Java CI with Maven](https://github.com/mfaisalkhatri/rest-assured-examples/actions/workflows/maven.yml/badge.svg)](https://github.com/mfaisalkhatri/rest-assured-examples/actions/workflows/maven.yml)
![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)## Don't forget to give a :star: to make the project popular.
## :question: What is this Repository about?
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.## :briefcase: What does this repo contain?
- This repo contains example codes of API Tests using Rest-Assured.
- `Hamcrest Matchers` are used for assertions.
- [TestNG](https://testng.org) Listeners are used to capture the events in logs.
- `Log4j` is used to capture logs.
- [Lombok](https://projectlombok.org/) is used to generate Getter and Setters automatically for post body
requests.
- FAKE Rest APIs on [Reqres.in](https://reqres.in/) is used for testing.
- End to End scenarios have been added for
the [restful booker APIs](https://restful-booker.herokuapp.com/apidoc/index.html).## :hammer_and_wrench: Talking more about the Scenarios Covered in this project:
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 `Get` requests?
- How to write tests for `POST` requests?
- How to write tests for `PUT` requests?
- How to write tests for `PATCH` requests?
- How to write tests for `DELETE` requests?
- How to handle the `authentication` requests?
- How to write tests for `SOAP API` requests?
- 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 `POJO` for passing values to request body?
- How to use `Lombok` to generate `Getters` and `Setters`?
- How to use `Lombok` for writing the builder pattern code?
- How to use Builder Pattern for test data generation using [Data Faker](https://github.com/datafaker-net/datafaker)?
- How to write end-to-end api tests?
- How to perform `JSON Schema Validation`?## :writing_hand: Blog Links
- [What is API Testing?](https://mfaisalkhatri.github.io/2020/08/08/apitesting/)
- [End to End API testing using rest-assured](https://medium.com/@iamfaisalkhatri/end-to-end-api-testing-using-rest-assured-a58c4ea80255)
- [How to perform JSON Schema Validation using Rest-Assured?](https://medium.com/@iamfaisalkhatri/how-to-perform-json-schema-validation-using-rest-assured-64c3b6616a91)
- [API Testing using RestAssured and OkHttp](https://mfaisalkhatri.github.io/2020/05/29/restassuredokhttp/)## :movie_camera: Tutorial Video
[![Watch the video](https://img.youtube.com/vi/xLKpdQE0oKY/hqdefault.jpg)](https://www.youtube.com/watch?v=xLKpdQE0oKY&t=1s)
[![Watch the video](https://img.youtube.com/vi/AFQSolEeu74/hqdefault.jpg)](https://www.youtube.com/live/AFQSolEeu74?si=8WROMbunjUuzqqQj&t=1)## :question: Need Assistance?
- Discuss your queries by writing to me @ `[email protected]`
OR ping me on any of the social media sites using the below link:
- [Linktree](https://linktr.ee/faisalkhatri)## :computer: Paid Trainings
- Contact me for Paid trainings related to Test Automation and Software Testing,
mail me @ `[email protected]` or ping me on [LinkedIn](https://www.linkedin.com/in/faisalkhatri/)## :thought_balloon: Checkout the blogs related to Testing written by me on the following links:
- [Medium Blogs](https://medium.com/@iamfaisalkhatri)
- [LambdaTest Blogs](https://www.lambdatest.com/blog/author/mfaisalkhatri/)
- [My Website](https://mfaisalkhatri.github.io)