A nice quick intro into contract testing. My experience is with Spring Cloud Contract, so for me it was nice to see what pact looks like. Just a few notes I have, feel free to take them or leave them or work them into a future aritcle in a series on contract testing as you like:
A lot of people might not be familiar with the maven failsafe plugin, might be good to have a one-liner explaining it. Something to the affect of: "Note: The maven failsafe plugin provides a lifecycle phase for running integration tests that runs after unit tests. By default it looks for classes suffixed with "IT" (Integration Test)" and maybe link to the apache documentation on the failsafe plugin: https://maven.apache.org/surefire/maven-failsafe-plugin/
All the example requests are 200's. Might be good to show a non-200 example to demonstrate that contract testing isn't just about happy path, but covers all interactions
The verifying the contract against the system service should fail initially, the user can then implement the endpoints (can be as simple as uncomment line(s)), to build confidence that the contracts are actively testing the service and not just mocks testing themselves or something like that (a lot of hesitance around contract testing would be if the tests are truly testing something)
A nice quick intro into contract testing. My experience is with Spring Cloud Contract, so for me it was nice to see what pact looks like. Just a few notes I have, feel free to take them or leave them or work them into a future aritcle in a series on contract testing as you like: