VIDHAIX / TESTING & QA / INTERVIEW PREP

Top 43 API Testing Interview Questions & Answers (2026)

HTTP, Postman, Newman, contract testing, auth, performance and API security questions with model answers.

43 questions with answersUpdated 22 October 2026Reviewed by VidhaiX trainers

This page is for manual testers moving into automation, QA engineers with a year or two of Postman experience, and SDETs preparing for senior rounds. API testing comes up in almost every QA interview now, because most products are a set of services behind a web or mobile front end, and teams want bugs caught at the service layer, where tests are faster and less flaky than UI tests.

In 2026, interviewers at Indian product companies, service companies and startups usually go past "what is a 404". They probe idempotency, auth flows, contract testing, running Newman or Playwright API tests in CI, test data strategy and basic API security. The questions are grouped as freshers, intermediate, experienced (3+ years) and scenario-based. VidhaiX trainers compiled them from the mock interviews they run, and each answer notes what a strong response includes and where candidates usually slip.

How to Prepare for a API Testing Interview

  • Pick a public API such as a demo bookstore or Petstore and build a Postman collection covering CRUD, auth, negative cases and chained requests that pass IDs between calls.
  • Run that collection with Newman from the command line, then wire it into a GitHub Actions workflow that publishes a JUnit or HTML report and fails the build on assertion errors.
  • Learn the status code families by heart and be ready to argue 400 vs 422, 401 vs 403, and 200 vs 201 vs 204 for specific endpoints you have tested.
  • Write a few API tests in code with Playwright APIRequestContext or REST Assured so you can show you are not limited to a GUI tool.
  • Read an OpenAPI spec end to end and validate real responses against its schemas; understand what consumer-driven contract testing with Pact adds on top of that.
  • Walk through an OAuth2 client credentials flow and decode a JWT by hand so you can explain claims, expiry and signature checks without hand-waving.
  • Skim the OWASP API Security Top 10 and prepare one concrete test idea for broken object level authorization, mass assignment and missing rate limits.
  • Prepare two stories from your own work: a bug you caught at the API layer and a flaky or slow API suite you stabilised, with numbers where you have them.

API Testing Interview Questions for Freshers

12 questions

Q1.What is API testing, and why do teams invest in it instead of only testing through the UI?

API testing sends requests directly to a service and checks the response status, headers, body, timing and side effects such as database changes. It skips the browser entirely.

Teams invest in it because API tests run in milliseconds, break less often than UI tests, and isolate the failing layer. Business rules usually live in the service, so you can cover many more input combinations cheaply. A weak answer says "it is faster"; a strong one mentions the test pyramid, earlier feedback in CI and testing services that have no UI at all.

Q2.Explain the common HTTP methods and what each one is meant to do.

GET reads a resource and must not change state. POST creates a resource or triggers a processing action. PUT replaces a resource completely at a known URI. PATCH applies a partial update. DELETE removes a resource. HEAD returns headers only, and OPTIONS describes allowed methods and is used in CORS preflight.

Interviewers often follow up by asking what happens if a PUT body omits a field. Under strict semantics that field should be cleared or defaulted, which is a good negative test to mention.

Q3.What does idempotency mean, and which HTTP methods are idempotent?

An operation is idempotent if making the same request once or many times leaves the server in the same state. GET, HEAD, PUT, DELETE and OPTIONS are idempotent by specification; POST is not, and PATCH is not guaranteed to be.

Note that idempotent does not mean identical responses: a second DELETE may return 404 while the state stays the same. A strong answer adds that payment APIs make POST safe to retry with an Idempotency-Key header, and that you should test retries explicitly.

Q4.Walk me through the HTTP status code families and the codes you check most often.

1xx is informational, 2xx success, 3xx redirection, 4xx client errors and 5xx server errors. The ones testers check daily are 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Content, 429 Too Many Requests, 500 and 503.

A common trap is treating any 4xx as a pass for a negative test. If invalid input returns 500, that is a bug: the server crashed instead of validating.

Q5.What is the difference between 401 and 403?

401 Unauthorized means the request is not authenticated: the token is missing, expired or invalid, and the server should send a WWW-Authenticate header. 403 Forbidden means the server knows who you are, but you lack permission for this resource or action.

In tests, cover both separately: call with no token and an expired token for 401, and with a valid low-privilege user for 403. Some APIs deliberately return 404 instead of 403 to avoid revealing that a resource exists, which is acceptable if documented.

Q6.What parts of an API response do you validate apart from the status code?

Status code alone proves very little. I validate the response body values against the request, the schema (types, required fields, no unexpected nulls), headers such as Content-Type, Location on 201, caching and CORS headers, and response time against an agreed budget.

I also verify side effects: a follow-up GET returns the created record, the database row exists, an event was published. Candidates who only check status and one field miss most of the real bugs, which hide in wrong defaults, rounding and missing fields.

Q7.How would you compare REST, GraphQL and gRPC from a tester's point of view?

REST uses resource URLs, HTTP methods and status codes, so tools like Postman fit naturally. GraphQL exposes one endpoint where the client picks fields; errors often arrive with HTTP 200 inside an errors array, so you must assert on the body, and you test query depth and cost limits.

gRPC uses Protocol Buffers over HTTP/2 with strict contracts and its own status codes such as NOT_FOUND and DEADLINE_EXCEEDED. You need tools that load .proto files, and streaming calls need separate tests for ordering and cancellation.

Q8.What is a Postman collection, and how do environments and variables fit in?

A collection is an ordered, shareable group of requests with folders, scripts, auth settings and documentation. It is the unit you version, run with the Collection Runner or Newman, and share with the team.

Variables avoid hard-coding: {{baseUrl}} or {{token}} resolve from scopes in order of precedence: local, data, environment, collection and global. Environments hold per-stage values such as dev, QA and staging URLs. A common mistake is committing secrets inside exported environments; keep them in initial values blank or use a vault.

Q9.How do you write assertions in Postman test scripts?

Test scripts run after the response arrives (the Post-response tab in current Postman). You use pm.test() with Chai-style pm.expect() assertions on pm.response. Each pm.test shows up as a separate pass or fail in the runner and in Newman reports.

Keep each test focused on one behaviour so the failure message is meaningful, and avoid wrapping everything in one giant test.

js
pm.test('status is 201', function () {
  pm.response.to.have.status(201);
});

pm.test('returns the created order', function () {
  const body = pm.response.json();
  pm.expect(body.id).to.be.a('string');
  pm.expect(body.status).to.eql('PENDING');
  pm.collectionVariables.set('orderId', body.id);
});

Q10.What is negative testing for an API? Give a few examples.

Negative testing checks that the API rejects bad input cleanly, with the right 4xx code, a useful error message and no side effects. Examples: missing required fields, wrong data types, values outside limits, malformed JSON, invalid enum values, duplicate creates, wrong Content-Type, expired tokens and requests for another user's resource.

A strong answer adds that you verify nothing was written to the database after a rejected request, and that error responses do not leak stack traces or SQL.

Q11.What is the difference between query parameters, path parameters, headers and the request body?

Path parameters identify a specific resource, as in /users/42. Query parameters filter, sort or paginate, as in ?status=active&page=2. Headers carry metadata such as Authorization, Content-Type, Accept and correlation IDs. The body carries the payload for POST, PUT and PATCH, usually JSON.

Testers should try each channel separately: encoding special characters in query strings, very long path values, missing headers, and a body sent with the wrong Content-Type.

Q12.What is an API key, and how is it different from a bearer token?

An API key is a long-lived static secret that identifies the calling application, usually sent in a header such as x-api-key. It rarely carries user identity or fine-grained scopes. A bearer token, often a JWT from an OAuth2 flow, is short-lived, tied to a user or client, and carries scopes and expiry.

Tests for keys include missing, revoked and wrong-environment keys, and confirming keys are never accepted in query strings where they end up in logs.

API Testing Intermediate Interview Questions

12 questions

Q13.How do you chain requests in Postman, for example create a user and then fetch it?

Save the value you need from the first response into a variable in its test script, then reference it in the next request as {{userId}}. Prefer collection variables over globals so state does not leak between collections.

For token handling, a collection-level pre-request script can fetch and cache a token before every request. To control order beyond the default sequence, pm.execution.setNextRequest() (formerly postman.setNextRequest()) lets you branch or skip in the runner. Overusing it makes collections hard to follow, so keep flows linear where possible.

Q14.What do you use pre-request scripts for in Postman?

Pre-request scripts run before the request is sent. Typical uses are generating unique test data such as timestamps or random emails, computing HMAC signatures, fetching an OAuth token with pm.sendRequest() when the cached one has expired, and setting dynamic headers.

The trap is putting assertions or heavy logic there. Keep them small and put shared logic at collection or folder level, so every request inherits it instead of copying the same script into twenty places.

js
const exp = pm.collectionVariables.get('tokenExpiry');
if (!exp || Date.now() > Number(exp)) {
  pm.sendRequest({
    url: pm.environment.get('authUrl'),
    method: 'POST',
    header: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: { mode: 'urlencoded', urlencoded: [
      { key: 'grant_type', value: 'client_credentials' }
    ] }
  }, function (err, res) {
    pm.collectionVariables.set('token', res.json().access_token);
    pm.collectionVariables.set('tokenExpiry', Date.now() + 50 * 60 * 1000);
  });
}

Q15.How do you run a Postman collection with Newman in a CI pipeline?

Export the collection and environment, or pull them through the Postman API, and run newman run in the pipeline. Pass secrets as --env-var from the CI secret store rather than committing them. Use reporters such as junit so the CI system shows individual test results, and an HTML reporter as a build artefact.

Newman exits with a non-zero code when assertions fail, which fails the job. Many teams now also use the Postman CLI, but Newman is still widely used because it is open source and needs no login.

yaml
- name: Run API tests
  run: |
    npx newman run collections/orders.json \
      -e envs/qa.json \
      --env-var "clientSecret=$CLIENT_SECRET" \
      -r cli,junit --reporter-junit-export results/api.xml
  env:
    CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}

Q16.How do you do data-driven API testing with Postman or Newman?

Pass a CSV or JSON file with -d in Newman, or select it in the Collection Runner. Each row becomes an iteration, and columns are available as {{variable}} in requests and as pm.iterationData.get() in scripts. Include an expected-status column so one request covers both valid and invalid rows.

Keep data files small and meaningful, covering boundaries and equivalence classes rather than hundreds of near-identical rows that only slow the run.

bash
# data/orders.csv: sku,qty,expectedStatus
newman run collections/orders.json -e envs/qa.json \
  -d data/orders.csv \
  -r cli,junit

Q17.How do you test paginated endpoints?

Check the first, middle and last pages, an empty result, page size at the limit and above it, and invalid values such as negative or non-numeric page numbers. Verify totals or next links are consistent and that walking all pages returns every record exactly once with no duplicates or gaps.

The interesting bug is offset pagination when data changes between calls: inserts shift records and you see duplicates. Cursor-based pagination avoids that, so ask which the API uses and test stable sort order, especially with ties on the sort key.

Q18.How would you test an API's rate limiting?

First confirm the documented limit and window per key, user or IP. Send requests up to the limit and verify they succeed, then exceed it and expect 429 with a Retry-After header or rate-limit headers. Wait for the window to reset and confirm access returns.

Also check that limits are per tenant so one noisy client cannot block others, and that bursts across several gateway instances are counted correctly. Run these against a dedicated environment, not shared QA, or you will block your colleagues.

Q19.Explain the OAuth2 flows you have tested and what you check in each.

Client credentials is machine-to-machine: post the client ID and secret to the token endpoint and get an access token. Authorization code with PKCE is for user login in web and mobile apps. Refresh tokens extend a session without re-login. The implicit and password grants are deprecated and should not appear in new systems.

I test expired and revoked tokens, wrong audience, missing scopes giving 403, refresh token rotation, and that tokens never show up in URLs or logs.

Q20.What is inside a JWT, and what should a tester verify about it?

A JWT has three Base64URL parts: a header with the algorithm, a payload with claims such as sub, exp, iat, aud, iss and scopes, and a signature. The payload is encoded, not encrypted, so anyone can read it.

Tests include a tampered payload with the original signature, alg set to none, an expired exp, a token from another issuer or audience, and checking that no sensitive data such as passwords or PII sits in the claims. Also confirm logout or revocation actually works if the system claims it does.

Q21.How do you write API tests in code with Playwright's APIRequestContext?

Playwright Test provides a request fixture, an APIRequestContext that shares config such as baseURL and extraHTTPHeaders. You call request.get() or request.post() and assert with expect(response).toBeOK() and normal matchers on response.json().

Its real strength is mixing layers: seed data through the API, then verify in the UI, or log in via API and reuse the storage state. Reports and traces include API calls, so debugging is the same as UI tests.

ts
import { test, expect } from '@playwright/test';

test('creates an order', async ({ request }) => {
  const res = await request.post('/api/orders', {
    data: { sku: 'BOOK-101', qty: 2 },
  });
  expect(res.status()).toBe(201);
  const order = await res.json();
  expect(order).toMatchObject({ sku: 'BOOK-101', qty: 2, status: 'PENDING' });

  const fetched = await request.get('/api/orders/' + order.id);
  await expect(fetched).toBeOK();
});

Q22.How does REST Assured structure a test, and when would you choose it?

REST Assured is a Java DSL using a given, when, then style: given() sets headers, auth and body, when() sends the request, and then() asserts status and body with Hamcrest matchers or JSON path. It integrates with JUnit 5 or TestNG and supports JSON schema validation through a module.

Choose it when the team and services are Java-based, so developers can review and run the tests. In a TypeScript shop, Playwright or a Node test runner is usually a better fit.

java
given()
    .baseUri("https://qa.example.com")
    .auth().oauth2(token)
    .contentType(ContentType.JSON)
    .body(Map.of("sku", "BOOK-101", "qty", 2))
.when()
    .post("/api/orders")
.then()
    .statusCode(201)
    .body("status", equalTo("PENDING"))
    .body("id", notNullValue());

Q23.How do you validate a response against an OpenAPI or JSON schema?

Extract the response schema from the OpenAPI spec and validate each response with a validator such as Ajv in JavaScript or the JSON schema module in REST Assured. In Postman, pm.response.to.have.jsonSchema() does the same. This catches type changes, missing required fields and renamed properties that value assertions often miss.

Set additionalProperties: false where the contract is strict, or you will not notice extra fields that leak data. Schema checks complement value checks; they do not replace them.

ts
import Ajv from 'ajv';
import addFormats from 'ajv-formats';

const ajv = new Ajv({ allErrors: true });
addFormats(ajv);
const validate = ajv.compile(orderSchema); // from the OpenAPI components

const body = await res.json();
expect(validate(body), JSON.stringify(validate.errors)).toBe(true);

Q24.What is mocking or service virtualisation, and when do you use it in API testing?

Mocking replaces a real dependency with a fake that returns controlled responses. Use it when the dependency is unavailable, costly, slow or hard to drive into edge cases, such as a payment gateway timing out or a third-party API returning 500. Tools include WireMock, Mock Service Worker, Prism for OpenAPI-driven mocks, Postman mock servers and Playwright's page.route() on the UI side.

The risk is mocks drifting from reality, so pair them with contract tests or periodic runs against the real dependency.

API Testing Interview Questions for Experienced (3+ Years)

11 questions

Q25.What is consumer-driven contract testing with Pact, and how does it differ from schema validation?

In Pact, the consumer's tests run against a Pact mock and record the requests they make and the response fields they rely on. That contract is published to a Pact Broker or PactFlow, and the provider verifies it by replaying the interactions against the real service.

Schema validation checks that the provider matches its own spec; Pact checks that it still satisfies what real consumers use. With can-i-deploy, you block a release that would break a consumer. Bi-directional contract testing can compare consumer pacts with a provider's OpenAPI spec instead.

ts
const provider = new PactV4({ consumer: 'web-app', provider: 'orders-api' });

await provider
  .addInteraction()
  .given('order 42 exists')
  .uponReceiving('a request for order 42')
  .withRequest('GET', '/api/orders/42')
  .willRespondWith(200, (b) => b.jsonBody({ id: like('42'), status: like('PENDING') }))
  .executeTest(async (mock) => {
    const order = await fetchOrder(mock.url, '42');
    expect(order.status).toBe('PENDING');
  });

Q26.How do you design an API test automation framework for a microservices product?

Keep a thin HTTP client layer with typed request builders, central auth and retries for known transient errors, separate from test logic. Add data factories that create and clean up their own data, environment config without secrets in code, and schema validation built into the client.

Split suites by speed: smoke on every merge, full regression nightly, and contract tests per service. Tag tests by service and owner so failures route to the right team. Report into CI with trend data. Interviewers want to hear about maintenance and ownership, not only folder structure.

Q27.How do you manage test data for API tests across shared environments?

Each test should create the data it needs through the API or a seeding endpoint, use unique identifiers such as a run ID prefix, and clean up afterwards, with a scheduled sweeper for anything left behind. Avoid depending on records someone created manually months ago.

For read-heavy reference data, use a versioned seed script applied when the environment is built. Never copy production data with real PII into QA; use synthetic or masked data. Parallel runs need isolation, for example a tenant or account per worker.

Q28.What does basic API performance testing look like with k6?

k6 scripts are JavaScript, run by a Go engine. You define virtual users and stages to ramp load, and thresholds such as p95 latency and error rate that make the run fail, so it can gate CI. Start with a baseline, then load, stress and soak tests.

Common mistakes: testing from a laptop over Wi-Fi, ignoring think time, and reporting only averages. Report percentiles, correlate with server metrics, and never point load tests at production or shared third-party sandboxes without agreement.

js
import http from 'k6/http';
import { check } from 'k6';

export const options = {
  stages: [{ duration: '1m', target: 50 }, { duration: '3m', target: 50 }],
  thresholds: { http_req_duration: ['p(95)<400'], http_req_failed: ['rate<0.01'] },
};

export default function () {
  const res = http.get(__ENV.BASE_URL + '/api/products?page=1');
  check(res, { 'status is 200': (r) => r.status === 200 });
}

Q29.Which items from the OWASP API Security Top 10 do you actively test, and how?

Broken object level authorization is the top risk: log in as user A and request user B's order ID, expecting 403 or 404. For broken authentication, test token tampering and brute-force protection. For broken object property level authorization, send extra fields like role: admin in a PATCH to check for mass assignment, and confirm responses do not expose internal fields.

I also test unrestricted resource consumption with huge page sizes or payloads, function level authorization on admin endpoints, and SSRF on any field that accepts a URL.

Q30.How do you test webhooks?

Webhooks reverse the direction: the system calls your endpoint. In tests, stand up a receiver such as a local server, a request bin in a test environment, or a WireMock stub, trigger the event, and assert on the received payload and headers.

Key checks: the signature header verifies with the shared secret, timestamps prevent replay, retries happen with backoff on 5xx or timeouts, duplicate deliveries are handled idempotently by the consumer, and events may arrive out of order. Poll with a timeout rather than fixed sleeps.

ts
import { createHmac, timingSafeEqual } from 'node:crypto';

function isValidSignature(rawBody: string, header: string, secret: string) {
  const expected = createHmac('sha256', secret).update(rawBody).digest('hex');
  const a = Buffer.from(expected);
  const b = Buffer.from(header);
  return a.length === b.length && timingSafeEqual(a, b);
}

Q31.How do you test APIs that process work asynchronously, such as a 202 Accepted with a job ID?

Assert the 202 and the job ID or status URL, then poll the status endpoint until it reaches a terminal state, with a sensible overall timeout and interval. Playwright's expect.poll() or a small retry helper works well; fixed sleep calls make suites slow and flaky.

Then verify the final result and side effects. Also test the failure path, such as an invalid file producing a failed job with a clear reason, and what happens when the same job is submitted twice.

ts
const res = await request.post('/api/reports', { data: { month: '2026-09' } });
expect(res.status()).toBe(202);
const { jobId } = await res.json();

await expect.poll(async () => {
  const s = await request.get('/api/jobs/' + jobId);
  return (await s.json()).state;
}, { timeout: 60_000, intervals: [1_000, 2_000, 5_000] }).toBe('COMPLETED');

Q32.How do you approach API versioning and backward compatibility in testing?

Know the versioning scheme first: URL path, header or media type. Run the previous version's regression suite against the new release to prove existing clients still work. Additive changes such as new optional fields are usually safe; removing fields, changing types, tightening validation or changing default values are breaking.

Contract tests and an OpenAPI diff tool in CI catch many of these automatically. Also test deprecation headers and sunset behaviour, and confirm mobile app versions still in the field are covered.

Q33.How do you decide what to automate at the API layer versus the UI layer?

Put business rules, validation, permissions, calculations and data combinations at the API layer, where tests are fast and precise. Keep UI tests for critical user journeys, rendering and integration of front end with back end, a much smaller set.

A mature answer mentions using APIs to set up state for UI tests, avoiding duplicate coverage of the same rule in both layers, and reviewing the split periodically using escaped defects. If a bug escaped, ask which layer should have caught it most cheaply.

Q34.How do you test GraphQL APIs beyond simple queries?

Test queries and mutations with variables, partial errors where data and errors both appear, nullability of fields, and authorization at field level, not just per operation. Check introspection is disabled or restricted in production.

Then the GraphQL-specific risks: deeply nested or aliased queries that cause heavy load, which depth and cost limits should reject, batching abuse, and N+1 database queries that a resolver may trigger. Schema checks in CI catch breaking changes such as removing a field clients still query.

Q35.How do you make API test suites run fast and in parallel without interfering with each other?

Design tests to be independent: each owns its data, makes no assumptions about order, and does not share mutable global state. Then the runner can shard across workers or CI machines. Reuse expensive setup such as auth tokens per worker with fixtures instead of logging in per test.

Watch for hidden coupling, like tests that count all records or depend on a shared feature flag. Keep timeouts tight, retry only known transient network errors, and track slowest tests so the suite does not slowly grow to forty minutes.

API Testing Scenario-Based Interview Questions

8 questions

Q36.Your Newman suite passes locally but fails intermittently in CI. What do you do?

First, collect evidence: which requests fail, the status and body, and timing. Use a JUnit or HTML report and log response bodies on failure. Then compare environments: base URL, secrets passed as --env-var, network egress, time zone, and whether CI runs collections in parallel against shared data.

Typical causes are tokens expiring mid-run, tests depending on data created by another run, eventual consistency where a GET runs before a write propagates, and rate limits hit by parallel jobs. Fix the cause; do not add blanket retries or sleeps.

Q37.The API returns 200 OK, but the mobile app shows wrong data. How do you investigate?

Capture the exact request the app sent, using a proxy or app logs, including headers, app version and query parameters. Replay it in Postman and compare with what the app displays. Often the API is correct for that request but the app sends a stale parameter, caches an old response or maps a renamed field.

If the response is wrong, narrow it down: check the database, any cache layer, and whether a recent deploy changed defaults. Then add a test that pins the expected contract so it cannot regress silently.

Q38.A third-party payment API you depend on has no sandbox for some failure cases. How do you test those paths?

Stub the payment provider at the boundary with WireMock or a similar tool and script the failure responses: declines, timeouts, 500s, malformed bodies and duplicate webhook callbacks. Point the service under test at the stub via configuration in the test environment.

To keep stubs honest, base them on real recorded responses and the provider's documentation, and run a small suite against the real sandbox regularly. Focus on what our system does: retries with idempotency keys, no double charges, and clear order status for the user.

Q39.A developer says a field rename is "just a small change" and wants to skip regression. How do you respond?

A field rename is a breaking change for every consumer that reads the old name, including mobile versions already installed and other teams' services. I would ask who consumes the endpoint, check contract tests or the Pact Broker for usage, and run an OpenAPI diff.

A safe path is to add the new field, keep the old one with a deprecation notice, migrate consumers, then remove it later. That is a factual conversation about risk, not a QA versus dev argument.

Q40.You discover that changing an order ID in the URL returns another customer's order. What do you do next?

That is broken object level authorization, a high-severity security bug. Confirm it with two test accounts you control, record minimal evidence, and report it privately through the security process rather than a public channel, flagged as critical.

Then widen the check: test the same pattern on related endpoints such as invoices, addresses and update or delete operations, since the root cause is usually a missing ownership check in a shared layer. Add automated authorization tests for every resource endpoint so it cannot return.

Q41.Your API regression suite has grown to 50 minutes and the team is skipping it. How do you fix that?

Measure first: list the slowest tests and setup steps. Usually the time goes to repeated logins, fixed sleeps, serial execution and heavy end-to-end flows duplicated across many tests. Cache tokens per worker, replace sleeps with polling, and make tests independent so they can run in parallel or shard.

Then split the suite: a fast smoke set on every pull request and the full set nightly or before release. Delete or merge tests that cover the same rule. Report the new runtime so people trust it again.

Q42.A release is due tomorrow and the API spec was updated today with no time for full regression. What do you test?

I would diff the spec to see exactly what changed, then prioritise risk: changed endpoints and their consumers, authentication and authorization paths, payment or data-writing flows, and anything the business cannot afford to break. Run the smoke suite and contract tests plus focused tests on the changes.

Then be explicit with the team: list what was tested, what was not, and the residual risk, so the release decision is informed. Pushing back on the timeline is fine if a critical path is untested.

Q43.Under load testing, p95 latency on one endpoint jumps from 200 ms to 3 seconds at 100 users. How do you proceed?

First confirm the result is real: the load generator is not saturated, the environment is sized close to production and no other jobs were running. Then correlate the spike with server metrics such as CPU, memory, database connections and slow query logs, and with traces if the team uses OpenTelemetry.

Common causes are a connection pool exhausted, a missing index, N+1 queries or a lock. Share findings with numbers and graphs, help reproduce the issue with a smaller script, and rerun the same test after the fix to compare.

From answers to offers

Prepare for API Testing interviews with practicing engineers

If you can answer the theory but have not built a CI-ready API suite yourself, this sprint walks you through collections, scripting, Newman pipelines and contract checks on a real project.