Interview Q&A · questions with model answers

Testing Interview Questions

Part of the study plan for: Backend Engineer · QA Engineer / SDET · Frontend Engineer · Full Stack Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What is the test pyramid, and is it still relevant?

    The test pyramid recommends many fast unit tests, fewer integration tests, and a small number of slow end-to-end tests, because cost and flakiness rise toward the top. It's still a useful guide,…

  2. What is test-driven development (TDD) and when is it useful?

    TDD is a cycle of writing a failing test (red), writing the minimum code to pass (green), then refactoring. It drives design toward testable, decoupled code and yields a regression suite, and works…

  3. What is contract testing?

    Contract testing verifies that a provider API and its consumers agree on request/response formats without spinning up the whole system. Consumer-driven contracts (Pact) let consumers publish…

  4. What is contract testing, and when would you use it?

    Contract testing checks that a service and its consumers agree on the API between them, without running both together. In consumer-driven contract testing (Pact), each consumer records the requests…

  5. What is exploratory testing, and how do you do it well?

    Exploratory testing is simultaneous learning, test design and execution: a tester investigates the product with a goal (a charter) instead of following scripts, using their judgment to find problems…

  6. What is property-based testing?

    Instead of hand-picked examples, you state properties that must hold for all inputs (e.g., decode(encode(x)) == x) and the framework generates many random inputs, shrinking failures to minimal…

  7. What are snapshot tests, and what are their risks?

    Snapshot tests save serialized output (rendered components, API responses) and fail when it changes. They catch unintended changes cheaply, but large snapshots get rubber-stamped on update and don't…

  8. What are ephemeral (preview) environments and why use them?

    Ephemeral environments are short-lived, full deployments created per pull request, with their own database and URL, so reviewers and automated tests can exercise changes in isolation before merging.…

  9. What is chaos engineering?

    Chaos engineering deliberately injects failures (killing instances, adding latency, dropping network, failing dependencies) in controlled experiments to verify that systems degrade gracefully and…

  10. What should API tests verify?

    Status codes, response schemas and important fields, validation errors, authentication and authorization (including access to other users' resources), pagination, idempotency, error formats and edge…

  11. What are smoke tests?

    Smoke tests are a small, fast set of checks run right after deployment (health endpoint, login, a key page or API call) to confirm the release basically works before shifting traffic or declaring…

  12. What is mutation testing?

    Mutation testing introduces small changes (mutants) to the code, such as flipping a comparison or removing a call, and checks whether the test suite fails. Surviving mutants reveal weak tests that…

Was this page helpful?

Report a mistake