API Testing Interview questions for experienced professional

Sachin Joshi
3 min readMay 1, 2022

--

1. Tell me some advantages of API Testing ?

  • Simple GUI Integration: This helps if you want to perform functional GUI tests after API Testing.
  • Time Effective: GUI Tests are relatively slower than the API Tests as it needs Web Elements to be polled before start of GUI Testing. Also, API tests needs less coding which provides better & faster test coverage which results in cost savings for testing project
  • Language-Independent: Data in API tests are in the form of XML/JSON which makes it language independent, which leverage tester to select code language of its choice while adopting in testing project
  • Core Functionalities can be tested early: API tests provides access to the application with GUI. code level functionalities of the application can be tested before the GUI tests.

2. what are some common protocols used in API Testing ?

  • Rest
  • HTTP/HTTPS
  • SOAP
  • UDDI
  • JMS

3. while Designing the API tests, what are basic principles needs to be considered ?

  1. Clean-up: at the start of testing(pre-tests), need to check data which is already present in the application or created in the previous regression runs and clean it up.
  2. Setup: initialise data, create objects, start required services for testing, etc.
  3. Execution: steps to execute API, or test scenarios which includes test logs
  4. Validation: status code, Schama, data in the response, etc.
  5. Reporting: pass, fail, blocked, waiting state, previous run report, how many times it failed in regression before the last pass.

4. while performing API tests what must be checked ?

  • Data accuracy
  • Schema
  • Status code
  • Authorization
  • Data type, order, validation & completeness
  • response timeout
  • Err. codes (in case of negative testing)

5. Tell me some challenges faced while API testing ?

  • calling sequences
  • parameter combination
  • output verification & validation
  • parameter selection
  • input values — If GUI is not available, it is challenging to find out the Input values required to test the API.

6. what type of common bugs that API tests found ?

  • Improper error.
  • performance
  • Multi-threading issues
  • Security
  • Stress
  • Reliability
  • Unused flags
  • Not Implemented error
  • Functionality Missing
  • Duplication Functionality Implemented

7. Name some of the common API Documentation Templates ?

  • Swagger
  • RestDoc
  • FlatDoc
  • Slate
  • Web Services API Specification
  • API Blueprint
  • Miredot

8. what is REST(Representational State Transfer) ? and what are RESTful services ?

REST - An architectural style for developing web services which exploit the ubiquity of HTTP protocol and uses HTTP method to define actions.

In REST every component revolves as a resource which can be accessed through a shared interface using standard HTTP methods.

In REST architecture, each resource is identified by URIs or global IDs.

REST uses multiple ways to represent a resource like — text, JSON, and XML.

RESTful Web Services,

Web services developed in the REST style are referred as RESTful web services.

These web services use HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI(Uniform Resource Identifier) service, provides resource representation like JSON and a set of HTTP methods.

SOAP (Simple Object Access Protocol) — an XML-based method to expose web services.

9. Name some common HTTP methods supported by REST ?

  • GET
  • PUT
  • PATCH
  • POST
  • DELETE
  • OPTIONS
  • HEAD

Note:

HEAD asks for a response Similar to GET but without the response body.

PUT & POST are similar except,

PUT operation can cache the response while the responses to POST operation are not cacheable.

OPTIONS creates read-only request to the server.

10. what is Payload ?

Payload is the most common term used in the case of REST APIs.

It refers to the actual data sent to the server in the API request in different formats like JSON, XML etc.

11. List some common API Testing Tools ?

  • RapidAPI
  • RestAssured
  • POSTMAN
  • Paw
  • SOAP
  • Katalon Studio
  • JMeter
  • Karate DSL
  • Tricentis Tosca
  • Assertible
  • Apigee
  • RestSharp
  • etc…

As we end to the questions list here, please read each question topic very deep before moving to next question as each topic can have list of questions that can be expected during the interview. so be ready for at-least 5 different questions on each topic.

hit the follow button for more topics on Java, RestAssured, GraphQL, Selenium, JavaScript, JUnit, Jenkins, GitHub Actions, WebUI, SOAP & VBScripts

https://medium.com/@sachinjoshi12687

Also, DM me if you want me to add new topic of your choice urgently.

--

--

Sachin Joshi

follow me for more topics on Java, RestAssured, GraphQL, Selenium, JavaScript, JUnit, Jenkins, GitHub Actions, WebUI, SOAP & VBScripts