Consumer-Driven Contract Testing with Pact and Java - Part II
The previous post explains the principles and motivations behind contract testing. Today we give a look to how write consumer-driven contract tests with pact and Java in a SpringBoot application.
Pact foundation provides junit5 integration for creation and verification of contracts.
Let’s start!
What you need The Java Pact Testing framework used in this example is the 4.0.0, based on v3 specification.
Furthermore, you should have:
jdk 1.8 or later maven 3.