Bird
0
0

What is the main purpose of contract testing in microservices using Pact?

easy📝 Conceptual Q11 of 15
Microservices - Testing Microservices
What is the main purpose of contract testing in microservices using Pact?
ATo check database schema consistency
BTo test the user interface of a microservice
CTo verify that services agree on request and response formats
DTo measure the performance of a microservice
Step-by-Step Solution
Solution:
  1. Step 1: Understand contract testing role

    Contract testing ensures that two services agree on how they communicate, specifically the request and response formats.
  2. Step 2: Identify Pact's function

    Pact automates contract testing by creating and verifying these agreements between microservices.
  3. Final Answer:

    To verify that services agree on request and response formats -> Option C
  4. Quick Check:

    Contract testing = Verify service agreements [OK]
Quick Trick: Contract testing checks communication agreements, not UI or performance [OK]
Common Mistakes:
  • Confusing contract testing with UI testing
  • Thinking contract testing checks database schemas
  • Assuming contract testing measures performance

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes