I am currently implementing bi-directional testing...
# pact-js
m
I am currently implementing bi-directional testing, however I think it would be good to be able to run the tests locally during development for a quick verification check. Is this possible for bi-directional testing? I know for consumer led, you can download the pact files locally and use the testing tools to verify there. I could do this for the provider, but it would involve a different test flow?
What I mean is traditionally for bi-directional, the provider verifies their own tests and simple uploads an openapi doc (there are no pact tests locally to verify they match??) To get the feedback you need to • Upload the openapi doc • use
can-i-use
• record the deployments into the environments but if you wanted to close that loop, you would need to • Download the latest consumer pacts • Run a provider test against those pacts?
y
latest from main branch or deployed/released from any consumers. run pacts against https://github.com/pactflow/swagger-mock-validator you could just use the Pact Verifier and use consumer version selectors to retrieve the correct pacts, and perform the requests against the actual application, rather than statically against the openapi. it might depend on how you leverage OAS. design first or autogenned, combo of both, and where you want the feedback.
m
We have a roadmap item for a
can-i-deploy
local variant, which allows you to pass in either a work-in-progress pact or OAS
but for now, Yousaf’s suggestion might get you going