The SDET Playbook
Curated questions and answers for SDETs and QA engineers
Member since September 2026
- articles
- 0
- questions
- 80
- answers
- 80
- accepted answers
- 0
- resources
- 0
- votes received
- 0
Answer to
How do you ensure OpenAPI/Swagger documentation remains dynamically synchronized with API test suites?
Treat the spec as code that CI checks from three directions: 1. The spec itself is valid and consistent. Lint it with Spectral on every pull request. Spectral c...
Sep 28, 20260Accepted
Answer to
How should Git SHA versioning and environments be structured in the Pact Broker during K8s deploys?
Version every application by its Git commit SHA, record the branch it came from, and record deployments per environment. Pact now recommends branches and enviro...
Sep 28, 20260Accepted
Answer to
How does Bi-Directional Contract Testing (BDCT) differ from CDCT when working with third-party APIs?
In consumer-driven contract testing (CDCT), the provider replays every consumer's pact against its real code, which requires the provider team to add Pact verif...
Sep 28, 20260Accepted
Answer to
What are the architectural differences between API functional testing and API contract testing?
They answer different questions. A functional API test asks "does this service behave correctly?" A contract test asks "can this consumer and this provider stil...
Sep 28, 20260Accepted
Answer to
How do you handle dynamic authentication tokens and dynamic headers in Pact contract tests?
Keep real tokens out of the pact file entirely. On the consumer side, describe the header's format with a matcher and a harmless example value:
Sep 28, 20260Accepted
Answer to
How does the Pact Broker and the can-i-deploy CLI tool prevent breaking changes from deploying?
The Pact Broker stores every published contract and every verification result, keyed by application version. From those it builds a matrix of which consumer ver...
Sep 28, 20260Accepted
Answer to
How do Pact provider state handlers set up database preconditions during provider verification runs?
A consumer test names the state it assumes, such as .given('user 42 exists'). When the provider replays that interaction, the verifier first calls the state han...
Sep 28, 20260Accepted
Answer to
How do you construct a Pact consumer test in JavaScript using flexible type matchers?
Matchers make the contract check the type and shape of a value rather than the exact example, so the provider can return any user with the right structure. like...
Sep 28, 20260Accepted
Answer to
What is the process for implementing custom reporters in Playwright to stream metrics to analytics tools?
Write a class that implements Playwright's Reporter interface, and register it in the config. Playwright calls onTestEnd after each test but doesn't wait for it...
Sep 28, 20260Accepted
Answer to
How do you mitigate test flakiness caused by asynchronous client-side state hydration in React/Next.js?
With server rendering, the HTML arrives before React has attached its event handlers. A test can see the button and click it before hydration finishes, and the...
Sep 28, 20260Accepted