Skip to content
Preptima

API Testing interview questions

Contract and schema validation, auth handling, data setup and teardown, and REST Assured or Postman workflows.

4 questions in QA & Testing.

medium1

mediumConceptDesignScenario

Two teams own two services that talk to each other. How do you stop one breaking the other without running both together in a shared environment?

Contract testing has each side verify itself against a shared description of the interaction, so consumer expectations are checked against the provider's real behaviour without the two ever running together. Mismatches surface in each team's own pipeline, not in a shared environment days later. It also connects api testing to the point an interviewer is testing.

4 minmid, senior

hard3

hardConceptScenarioDesign

Your consumer-driven contract test passes in CI, but production rejects a request because a supposedly optional field is missing. What did the contract testing actually miss?

The contract captured the shape the consumer sends, not the rules the provider enforces. Optionality lived in the schema while the real requirement lived in provider validation, and no recorded example ever omitted the field. Contract tests only verify interactions they contain, so add the negative example and verify against real code.

4 minmid, senior, staff