0% found this document useful (0 votes)
4 views6 pages

API Testing Q&A

This document provides a comprehensive guide with 30 essential API testing interview questions and answers aimed at helping QA engineers prepare for interviews. It covers key concepts such as types of API requests, common tools, status codes, authentication, and testing methodologies. The guide emphasizes the importance of API testing in ensuring application functionality and reliability, particularly in modern architectures.

Uploaded by

shreepatil1236
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

API Testing Q&A

This document provides a comprehensive guide with 30 essential API testing interview questions and answers aimed at helping QA engineers prepare for interviews. It covers key concepts such as types of API requests, common tools, status codes, authentication, and testing methodologies. The guide emphasizes the importance of API testing in ensuring application functionality and reliability, particularly in modern architectures.

Uploaded by

shreepatil1236
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

30 API Testing Interview Questions and

Answers for QA Engineers


Doc by Aston Cook

This guide provides 30 essential API testing questions with clear, practical answers to help QA
engineers prepare for real interviews using tools like Postman, Playwright, and Rest Assured.

1. What is API testing?

Answer:

API testing focuses on verifying application programming interfaces directly to ensure they meet
functionality, reliability, performance, and security expectations.

2. What are the common types of API requests?

Answer:

GET, POST, PUT, PATCH, DELETE.

3. What tools are commonly used for API testing?

Answer:

Postman, Rest Assured, SoapUI, Playwright (request module), and JMeter.

4. What is the difference between PUT and PATCH?

Answer:

PUT replaces the entire resource. PATCH updates specific fields without affecting the rest.
5. What does status code 200 mean?

Answer:

It indicates the request was successful.

6. What does status code 201 mean?

Answer:

The request was successful and resulted in the creation of a resource.

7. What is status code 400?

Answer:

Bad Request. Usually caused by invalid input or malformed syntax.

8. What is the difference between 401 and 403?

Answer:

401 means unauthorized. 403 means forbidden even if authenticated.

9. What is a response payload?

Answer:

The body of the response containing the data returned by the API.

10. How do you validate a JSON response?

Answer:

Check status codes, response time, data types, keys, and values using assertions.
11. How do you pass headers in a request?

Answer:

Use the headers section in Postman or code methods to include key-value pairs like
Content-Type or Authorization.

12. What is an authentication token?

Answer:

A string returned after login that allows access to protected endpoints. Usually passed as a
Bearer token in headers.

13. How do you test secure APIs?

Answer:

Include proper authentication headers and test authorization checks, token expiry, and HTTPS
protocols.

14. What is a query parameter?

Answer:

Key-value pairs added to the URL to pass data, such as /users?page=2.

15. What is the difference between path and query parameters?

Answer:

Path parameters are part of the URL (e.g. /users/1). Query parameters follow the ? in a URL.

16. How do you test a DELETE request?


Answer:

Send a DELETE call with a valid ID and validate status code (often 204) and ensure the
resource is removed.

17. What is the purpose of schema validation?

Answer:

To verify that the response matches the expected structure, data types, and required fields.

18. How do you test negative scenarios?

Answer:

Send invalid inputs or omit required headers and assert correct error codes like 400 or 422.

19. How do you test API rate limiting?

Answer:

Send rapid successive requests and validate that the server returns a 429 Too Many Requests
status.

20. How do you test pagination?

Answer:

Check that API responses return correct data chunks using page, limit, or offset parameters.

21. What is a mock server?

Answer:

A simulated server used for testing API requests and responses without relying on a live
backend.
22. What is API chaining?

Answer:

Using data from one API response (e.g., user ID) in a subsequent request.

23. How do you validate response time?

Answer:

Assert that the response time is under a threshold like 200ms using tools like Postman or
custom scripts.

24. How do you handle dynamic data in tests?

Answer:

Capture values like IDs at runtime and reuse them within the same test session.

25. What is a collection in Postman?

Answer:

A group of saved requests organized together for test execution and sharing.

26. How do you test APIs in Playwright?

Answer:

Use the request context to send HTTP requests and validate responses using assertions.

27. What is Rest Assured?

Answer:
A Java-based library used to test REST APIs using a fluent syntax to write requests and
assertions.

28. What is a bearer token?

Answer:

A type of access token used in API authorization headers to verify identity.

29. What is JSONPath?

Answer:

A syntax for extracting data from JSON documents, useful for assertions in tests.

30. Why is API testing important in modern QA?

Answer:

APIs are the backbone of applications. Testing them ensures services interact correctly,
especially in microservice architectures.

You might also like