API Testing Interview
Try yourself, and Set yourself up to win.
- How to parse a JSON?
- How to parse an XML?
- Write code for conversion of JSON to XML and XML to JSON.
- What do you mean by the query parameter and path parameter?
- What is the difference between put and patch?
- Define what is validation while API automation?
- Explain your framework (Rest Assured).
- What do you mean by object notation and array notation in JSON?
- Write code for JSON Read
- What do you mean by POJO why we use POJO?
- Explain what do you mean by authentication and what are the types of authentication while API testing?
- What is the difference between URI and URL
- How do you store the result and use it further in groovy scripting?
- Explain what do you mean by Test runner in groovy scripting?
- What is the Rest service architecture?
- Explain soap service architecture?
- What is the soap UI work hierarchy?
- How to set and get property using groovy scripting
- What do you mean by jsonsluper and xmlholder?
- How to convert JSON to Hashmap?
- What do you mean by Data source Data Sink and Data Source loop and why do we use it?
- How to handle SSL in SoapUI?
- What are the different types of properties in SoapUI How you declare using groovy scripting?
- Define Webservices and why do we use Webservices?
- What is the difference between soap and Rest?
- Explain what do you mean by UDDI and what do you mean by WSDL.?
- What are the different types of HTTP Methods?
- How to parse a list from a JSON, for example, there is JSON and there are multiple IDs how you will parse all the IDs from JSON and how you will parse a particular I’d from that JSON.
- Perform a POST Request with RestAssured?
- How you will test the REST API with Rest Assured?
- Write a simple Rest Assured test case that validates sample JSON response?
- API returns a simple integer array [1, 2, 3], how to test such a response using Rest Assured?
- How to treat float and doubles as BigDecimal in JSON input?
- Explain how to set path params in API calls?
- How to extract API responses after validation?
- Set cookies in API calls?
- Verify cookie, status, headers, and content-type in API response.
- How to test the REST API that requires OAuth1 authentication?
- You have a fleet of APIs that requires n number of custom headers, how can you avoid duplicating the code for parsing the same headers again and again?
- What is the difference between API and WebService?
- Difference between SOAP & Rest API?
- Can you write a sample of API(URL) and JSON?
- How do you handle the Authentication token?
- Types of Authentication in POSTMAN/ Rest-Assured.
- What is the difference between OAuth1.0 and OAuth2.O, When and where do you use and how. Can you write a sample code?
- What is the base URI in RestAssured?
- Can you explain RequestSpecification request = RestAssured.given();
- What will be returned type of response.jsonPath().getJsonObject(“XYZ”);
- How do you extract the values of JSON and how do you validate the response.
- Can you write a code for saving the response in a JSON file?
- How do you validate headers of response?
- What is the difference between Headers and Header class?
- What is difference between response.header(“xyz”) and response.headers() methods.
- Can you extract all the headers from the response at run time?
- What is JSONObject() , request.header(“xyz”), response.path(“lable”) , response.body().asString() , response.getBody().prettyPrint(); , RestAssured.given().queryParam(“xyz”,”abc”);
- What is the difference between request.get(“https//allstq.com/api/allcustomers”) and request.request(Method.GET,”/ allcustomers “);
- Difference between PUT and Patch? Have you ever used and where.
- What are status code(2xx ,3xx ,4xx, 5xx) in API.
- How do you print your response in JSON format?
- Post body in POST request and how many ways to post.
- What all are the dependency for Rest-Assured.
CHECK API TESTING INTERVIEW QUESTIONS
For more API Testing Interview Question visit ALLSTQ