0
votes

I'm exploring the chance to use pact-jvm with a client and provider that already exist and that are working productively. Currently I try to create a pact file per hand and verify it for the provider. I wonder if this even makes sense. I fear maybe I didn't get the point. Is this okay or am I off the track?

Thanks in advance

1
For clarify sake, are you saying you've creating the pact contract by hand? The JSON that specifies all interactions between the consumer and the provider? - J_A_X
Indeed, actually I'm trying to do that. - KnechtRootrecht

1 Answers

2
votes

As a general rule, creating the contract by hand - that is, manually crafting a JSON document according to the pact specification - is an anti-pattern in Pact.

We often see people using Pact where there are existing integrations, the first step is creating the consumer tests in the consumer code base and getting it to publish the pacts. Even just for a subset of its functionality to begin with.

Then you can look to verify it with the provider. Eventually, you add more and more tests until the complete functionality is covered at which point, you can remove any existing or invalidated E2E suites!