Rest- Assured API Testing Automation Interview Questions

  1. What is difference between API and WebService.
  2. What is difference between SOAP & Rest API.
  3. Can you write a sample of API(URL) and JSON.
  4. How do you handle Authentication token.
  5. How many type of Authentication in POSTMAN/ Rest-Assured.
  6. What is difference between OAuth1.0 and OAuth2.O ,When and where do you use and how. Can you write a sample code.
  7. What is baseURI in RestAssured.
  8. Can you explain RequestSpecification request = RestAssured.given();
  9. What will be returned type of response.jsonPath().getJsonObject(“XYZ”);
  10. How do you extract the values of JSON and how do you validate response.
  11. Can you write a code of save the response in a JSON file.
  12. How do you validate headers of response.
  13. What is difference between Headers and Header class.
  14. What is difference between response.header(“xyz”) and response.headers() methods.
  15. Can you extract all the headers from response at run time.
  16. What is JSONObject() , request.header(“xyz”), response.path(“lable”) , response.body().asString() , response.getBody().prettyPrint(); , RestAssured.given().queryParam(“xyz”,”abc”);
  17. What is difference between request.get(“https//dev-mode.com/api/allcustomers”) and request.request(Method.GET,"/ allcustomers ");
  18. What is difference between PUT and Patch . Have you ever used and where.
  19. What are status code(2xx ,3xx ,4xx, 5xx) in API.
  20. How do you print your response in JSON format.
  21. How do you post body in POST and how many way to post.
  22. What all are the dependency for Rest-Assured.

– Questions shared by Mr. Hari.
Happy Testing