https://pact.io logo
#pact-broker
Title
# pact-broker
a

Ankit Rawat

03/20/2022, 7:13 AM
@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

Matt (pactflow.io / pact-js / pact-go)

03/20/2022, 7:51 AM
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

Ankit Rawat

03/22/2022, 7:41 PM
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

Matt (pactflow.io / pact-js / pact-go)

03/23/2022, 2:26 AM
a

Ankit Rawat

03/23/2022, 4:58 AM
thanks, i was able to record deployments and environment. How do i trigger provider verification when consumer published a new pact
m

Matt (pactflow.io / pact-js / pact-go)

03/23/2022, 7:02 AM
I’d suggest having a quick search for “webhooks” on the docs.pact.io site
2 Views