pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.08k stars 480 forks source link

Add support for publishing pacts to broker from au.com.dius.pact.consumer:junit5 #1554

Open TGNThump opened 2 years ago

TGNThump commented 2 years ago

It would be useful to be able to publish pacts directly to the broker using au.com.dius.pact.consumer:junit5 instead of having to rely on the cli or au.com.dius.pact.provider:maven.

rholshausen commented 2 years ago

The main problem with this is knowing when the Pact is complete and ready to be published. The tests for the interactions can be spread over a number of test classes, and JUnit can run the tests in parallel and also random order.

The reason the CLI is used, it will run after the tests have all run and you know everything is complete.