Bird
0
0

A team wants to test multiple versions of a provider service against the same consumer contract using Pact. What is the best approach?

hard📝 Trade-off Q8 of 15
Microservices - Testing Microservices
A team wants to test multiple versions of a provider service against the same consumer contract using Pact. What is the best approach?
ARun Pact Verifier only on the latest provider version
BCreate separate contracts for each provider version
CUse Pact Broker with version tagging to manage contracts
DDisable contract testing for older versions
Step-by-Step Solution
Solution:
  1. Step 1: Understand version management in Pact

    Pact Broker supports tagging contracts with versions to manage multiple provider versions.
  2. Step 2: Identify best practice

    Using Pact Broker with version tags allows testing multiple provider versions against the same contract efficiently.
  3. Final Answer:

    Use Pact Broker with version tagging to manage contracts -> Option C
  4. Quick Check:

    Version tagging = Manage multiple provider versions [OK]
Quick Trick: Use Pact Broker tags for multi-version testing [OK]
Common Mistakes:
  • Duplicating contracts unnecessarily
  • Testing only latest version
  • Skipping tests for older versions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes