Hi Team, I am a QE and have just started learning ...
# general
a
Hi Team, I am a QE and have just started learning about Pact and looking for possibilities to introduce it to our team. Do we have to write Pact tests close to the dev code only? Can we write contract tests in a different repo (other than dev repo) using Pact/Cypress? Would it still serve the purpose?
m
If you want to use the Pact framework on both the consumer and provider side, you really need the tests to be part of the code that is being tested (think of them as unit tests)
You could use tools like Cypress to generate pact files, but I wouldn’t currently recommend using that with Pact on the provider side
We do have a feature (in Pactflow only, so take note of that) that allows you to generate contracts from tools like Cypress and compare to an OAS file (see https://docs.pactflow.io/docs/bi-directional-contract-testing for what it is, the tradeoffs etc.) There are a number of example projects (https://docs.pactflow.io/docs/examples/) and blog articles (pactflow.io/blog) that go through both types of testing
a
Thank you Matt for the guidance. I will go through the docs and links provided.
👍 1