API - Testing Practice Test

▶

Add Your Heading Text Here

Sample API - Testing Practice Questions

Try these questions from our free API - Testing practice tests. The correct answer and an explanation follow each question.

  1. Which HTTP method is idempotent and used to fully replace a resource?

    • A. POST
    • B. PUT
    • C. PATCH
    • D. DELETE

    Answer: B. PUT

    PUT is idempotent and replaces the entire resource at the specified URI.

  2. What is the 'N+1 query problem' in GraphQL testing?

    • A. Running one extra test per endpoint
    • B. Fetching a list then making N additional queries for each item's related data
    • C. Using one extra authentication call
    • D. Making N backup requests per mutation

    Answer: B. Fetching a list then making N additional queries for each item's related data

    The N+1 problem occurs when a GraphQL resolver fetches a list (1 query) then makes a separate database call for each item (N queries), severely hurting performance.

  3. What does a 503 Service Unavailable response indicate?

    • A. Client authentication failure
    • B. The server is temporarily unable to handle the request
    • C. Resource not found
    • D. Request timeout on client side

    Answer: B. The server is temporarily unable to handle the request

    503 Service Unavailable indicates the server is temporarily unable to handle the request, often due to maintenance or overload.

  4. Which tool is commonly used for testing SOAP web services?

    • A. Postman (limited)
    • B. SoapUI
    • C. k6
    • D. Newman

    Answer: B. SoapUI

    SoapUI is the industry-standard tool for testing SOAP web services, supporting WSDL import, assertion-based testing, and security scanning.

Take the full API - Testing practice test

▶ Start Quiz