top of page

Rest Assured Coding Exercises



1. Write Code using Rest Assured API to verify API Response Code 200.


Here is JSON file to simulate the API


2. Write Code using Rest Assured API to verify API Response Code 404


Here is JSON file to simulate the API

3. Write Code using Rest Assured API to verify Content Type of API response


Use JSON File as mentioned in Exercise 1 to simulate the API response.


4. Write Code using Rest Assured API to verify AP Response Body Contents


Use JSON File as mentioned in Exercise 1 to simulate the API response.

5. Write Code using Rest Assured API to perform POST Operation using Model Class and check API Response code 200


Model class to use as below:


Use JSON File as below to simulate the API response.

6 . Write Code using Rest Assured API to perform POST Operation and check contents of Response Body using Model Class


Use JSON File as below to simulate the API response.

Use Model Class as shown in Exercise 5.


7. Write Code using Rest Assured API to perform Data driven testing and verify contents of Response Body


Use JSON File as below to simulate API Response along with Exercise 1 JSON:



bottom of page