<@U9UUY3CU9> this is my understanding of bi-direc...
# pact-broker
a
@Matt (pactflow.io / pact-js / pact-go) this is my understanding of bi-directional testing. Is this correct? 1.) Provider side upload the swagger file to pact broker which is called as provider contract. If the swagger file is generated by code, recommend writing test cases but if it is hand written then recommend to do functional testing using rest assured or some other functional testing tool. 2.) Consumer side we still need to publish the contract as in CDC 3.) Can-i-Deploy step then compares the consumer contract against the swagger file(aka producer file)
m
Yes Pretty close! If the contract is generated by code, from a contract testing standpoint we don't need any other validation. Of course, you should do other types of testing as required (e.g. functional)
If it's written by hand you can still test using the various methodologies mentioned - it only matters that you end up being confident your OAS is accurate/ correct and compatible with your code
a
also, can you explain how environments work ? or point me to a resource where it is documented @Matt (pactflow.io / pact-js / pact-go)
m
a
thanks, i was able to record deployments and environment. How do i trigger provider verification when consumer published a new pact
m
I’d suggest having a quick search for “webhooks” on the docs.pact.io site