This repository contains examples of REST API testing using Java, TestNG, and Rest Assured. It demonstrates how to perform basic GET, POST , PUT , PATCH , DELETE requests, deserialize response bodies into data model classes, and utilize data providers for parameterized testing.
https://gist.github.com/renuka2593/bb92b81fc58bee896cd597e45415b7fd
- Java Development Kit (JDK) installed
- Maven installed
- IDE (Integrated Development Environment) like IntelliJ IDEA or Eclipse
- Rest Assured: For simplifying API testing in Java.
- TestNG: Testing framework for Java.
- Clone this repository to your local machine.
- Import the project into your preferred IDE.
- Ensure that Maven dependencies are resolved.
You can run the tests using your IDE or via command line using Maven. To run via Maven, execute the following command from the project root:
mvn test
The tests utilize TestNG's data provider functionality to parameterize test cases.