Hey, does anyone have a good example of bi directi...
# pactflow
j
Hey, does anyone have a good example of bi directional contract testing? One thing I am struggling to understand is the tests that are run against the provider contract?
y
Hi we have example repos on the website, you can see the link for use cases for oas specs in the table https://docs.pactflow.io/docs/examples#providers From the provider side, the provider would provide their own functional testing against their oas spec and service, the results of which are uploaded to Pactflow along with the oas spec. The validation in Pactflow will take place against the uploaded oas spec and a consumers pact file when they call can-i-deploy to ensure that the consumers pacts are valid against the oas spec against whichever environment the consumer is targeting.
j
Ahh nice one thanks @Yousaf Nabi (pactflow.io) so for this example https://github.com/pactflow/example-provider-restassured/blob/master/src/test/java/com/example/springboot/ProductsAPITest.java A mock is created from the
oas/swagger.yml
file and then those
@Tests
run against it?
Does the created consumer contract in bi directional testing still get turned into a stub automatically with pact flow?