Skip to content
TargetQA

Real-Time & Career

SDET Interview Questions & Answers

SDET interview questions on test strategy, the test pyramid, framework architecture and design patterns, contract testing, mocking, metrics and flakiness at scale.

50 questions15 Beginner20 Intermediate15 Advanced
Hands-On SDET Labs

Practice API Test Automation & Contract Testing

Master OAuth token lifecycles, JSON schema validation, and downstream service mocking in our zero-setup online sandbox.

Explore API Testing Track

Interview Questions

Showing 15 of 50 questions

  1. An SDET is a developer focused on testability and quality engineering: building frameworks, tools, and tests across unit, API, and UI layers, and influencing design. A QA automation engineer typically focuses more on automating functional test cases.

  2. The test pyramid recommends many fast unit tests at the base, fewer integration or API tests in the middle, and a small number of end-to-end UI tests on top. Lower layers are faster, cheaper, and less flaky.

  3. I start from business risks and architecture, then define which test types run at which layer, the tools, environments, data approach, CI gates, and quality metrics. It should be a living document agreed with dev and product.

  4. Shift-left means moving quality activities earlier: reviewing requirements and designs, writing tests alongside code, running fast checks on every commit, and defining acceptance criteria before development.

  5. A stub returns canned responses, a mock also verifies how it was called, and a fake is a working lightweight implementation such as an in-memory database. A spy wraps a real object and records interactions.

  6. Each class has one responsibility, like page objects for UI, clients for APIs, and builders for data. Frameworks depend on interfaces such as a driver factory so implementations can be swapped without changing tests.

  7. Shared environments cause data collisions, unstable deployments, and version drift between services. Ephemeral environments per pull request, containerised dependencies, and service virtualisation reduce these problems.

  8. Page Object and Screenplay for UI abstraction, Factory for driver creation, Builder for test data, Singleton or ThreadLocal for config and drivers, and Strategy for switching execution targets.

  9. Contract testing verifies that a consumer and provider agree on the API shape without running both together. With consumer-driven tools like Pact, the consumer publishes expectations and the provider verifies them in its own pipeline.

  10. I virtualise the dependency with a tool like WireMock, returning realistic responses including errors and delays. This lets us test edge cases like timeouts and 500s that are hard to trigger with the real service.

  11. Load testing checks behaviour at expected traffic, stress testing pushes beyond limits to find the breaking point, spike testing applies sudden bursts, and soak testing runs a steady load for hours to find leaks.

  12. I track defect leakage to production, flaky test rate, pipeline duration, change failure rate, and mean time to detect and recover. Coverage is useful as a signal, not a target.

  13. I check that tests are independent, readable, assert meaningful behaviour, use the right layer, and avoid hard waits or hardcoded data. Test code is held to the same standards as production code.

  14. I create typed client classes per service that wrap HTTP calls, with request and response models, shared auth and logging filters, and tests that use the clients. Schema validation catches contract drift.

  15. I work with developers to add stable test IDs, test hooks and seed APIs, dependency injection for mocking, feature flags, and good logging. Testable design reduces reliance on brittle UI tests.