REST API Testing Interview Questions
List of frequently asked REST API Testing Interview Questions.
Most Frequently Asked REST API Testing Interview Questions this will be helpful in preparing for your upcoming interview:
1- What is the difference between API and WebService?
2- What is the difference between SOAP & Rest API?
3- Can you write a sample of API(URL) and JSON?
4- How do you handle the Authentication tokens?
5- How many types of Authentication in POSTMAN/ Rest-Assured.
6- What is the difference between OAuth1.0 and OAuth2.O, When and where do you use and how. Can you write a sample code?
7- What is the base URI 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 the response.
11- Can you write a code to save the response in a JSON file?
12- How do you validate the headers of the response?
13- What is the difference between Headers and Header class?
14- What is the difference between response.header(“xyz”) and response.headers() methods.
15- Can you extract all the headers from the 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//allstq.com/api/allcustomers”) and request.request(Method.GET,”/ allcustomers”);
18- What is the difference between PUT and Patch? Have you ever used it, if yes then where?
19- How do you post body in POST and how many ways to post.
20- What are status codes (2xx,3xx,4xx, 5xx) in API?
21- How do you print your response in JSON format?
22- What all are the dependency for Rest-Assured.
23- Describe what are the different types of output observed of an API.
24- Name the tools used for API test automation.
25- What challenges did you face under API testing?