Loading...
Loading...
Browse 4 real-world technical and behavioral interview questions about Api testing. Review scenarios, edge cases, and architectural best practices.
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.
Make every test create its own preconditions under a generated identity, scope each assertion to records that test owns, and treat cleanup as housekeeping rather than as the isolation mechanism, because teardown does not run when a test is killed.
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.
Separate contract tests, which check shape and backwards compatibility cheaply, from integration tests that exercise real behaviour across real dependencies. Make every test create and own its data so the suite is re-runnable, spend most of your negative cases on authorisation and malformed input.