Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junit5 multiple pact fragments for consumer tests #1342

Closed
artemptushkin opened this issue Apr 14, 2021 · 4 comments
Closed

Junit5 multiple pact fragments for consumer tests #1342

artemptushkin opened this issue Apr 14, 2021 · 4 comments

Comments

@artemptushkin
Copy link

Hi!

As for Junit4 you have @PactVerifications annotation to run multiple stubs during the particular test, but won't the analog for this in Junit5 or workaround? We have only @PactTestFor that doesn't support multiple pactMethod

You Junit4 example that would be appreciated to reproduce in Junit5 - https://github.com/pact-foundation/pact-jvm/blob/master/consumer/junit/src/test/java/au/com/dius/pact/consumer/junit/pactproviderrule/PactProviderWithMultipleFragmentsTest.java

I tried to put one @PactTestFor on the class level and one on the test, it doesn't work either, as I think it should not be. Even if yes, it doesn't support more than 2 fragments :)

@uglyog
Copy link
Member

uglyog commented Apr 21, 2021

@uglyog
Copy link
Member

uglyog commented Apr 21, 2021

Or are you referring to having a test with multiple providers? Ah, you refer to multiple stubs.

@artemptushkin
Copy link
Author

@uglyog yes, specifically multiple stubs by pact with one or more providers per consumer. I think multiple providers is also a case and more general even

@uglyog
Copy link
Member

uglyog commented May 9, 2021

4.2.5 has been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants