Write contract tests between services
Define consumer expectations, generate a contract, and verify the provider against it. Explains the difference between contract and integration testing.
Preview
Copy prompt
Write consumer-driven contract tests between [Service A] and [Service B] using [Pact / Spring Cloud Contract]. Define the consumer's expectations as a Pact consumer test, generate the contract file from that test, then write the provider verification test that confirms the provider honours every expectation in the contract. Explain the key conceptual differences between contract testing and integration testing and describe the scenarios where each is the better choice.
More
Testing
Prompts
