Contract tests verify that services can communicate correctly without needing all services running. They are faster and more reliable than full integration tests for microservices.
Strong answers cover: the challenge of testing distributed systems, contract testing (Pact or similar), consumer-driven contracts, service virtualisation for dependent services, the testing honeycomb (more integration tests, fewer E2E), and chaos testing. Best candidates discuss how testing strategy changes as architecture becomes more distributed.
Advanced QA question. Microservice testing requires a fundamentally different approach than monolith testing. Candidates who apply monolith testing strategies to microservices will struggle with scale and reliability.