Search code examples
pactcross-languagepact-jvmpact-go

pact cross-language contract testing


I wonder if pact can be tested across language contracts. For example, my provider is written in golang and the consumer is written in Java. If so, what is the corresponding relationship between their versions? By the way, which version of pact-jvm is more suitable? I have just come into contact with this technology and I am very confused about which version to use.

I'm in the research stage and haven't really tried it yet.


Solution

  • This is one of the main features of Pact - cross-language "polyglot" testing.

    The specification version is the key thing that matters. This is the version of the contract file that is produced, independent of the language you are using. That is, the specific versions of languages don't matter, it matters what version of the spec they produce or can verify. You'll need to work with the lowest common denominator, but V2 is the most widely supported as of this reply.

    This feature support table might help.