Hi Guys, need some help, I am writing pact test fo...
# pact-jvm
g
Hi Guys, need some help, I am writing pact test for some services, say there are three service, service A, B and C A and B both are consumer to different APIs exposed by C A has a pact consumer test, consumer=A, Provider=C B has a pact consumer test, consumer=B, Provider=C C has two different pact verification tests to verify both pacts when I just run consumer test for A and run verification test in C to verify that pact, it works fine, as soon as I run both consumer test for A and B and then run verification test for C, i get this error java.lang.AssertionError at PactVerificationStateChangeExtension.kt:52 Caused by: au.com.dius.pact.provider.junitsupport.MissingStateChangeMethod at PactVerificationStateChangeExtension.kt:125 Is it not allowed to put the same provider name in more than one consumer tests? or I am missing something in my configuration cc @Matt (pactflow.io / pact-js / pact-go) @Beth (pactflow.io/Pact Broker/pact-ruby)
I tried to follow the suggestions on this link - https://github.com/pact-foundation/pact-jvm/issues/1581 but it did not help
b
Please don’t @ the maintainers Gaurav.
Also, neither Matt nor I maintain or use pact JVM, so we cannot help you.
Ron is unwell at the moment unfortunately, so hopefully someone else from the channel can help you out.
g
Hi @uglyog , any suggestion for this?
u
You verification test needs to have all the provider state callbacks. The error message should be quite clear, look in the logs and it will show you what method you need to add.