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

Support for MessagePact? #162

Closed
vikasillumina opened this issue Sep 20, 2018 · 19 comments
Closed

Support for MessagePact? #162

vikasillumina opened this issue Sep 20, 2018 · 19 comments

Comments

@vikasillumina
Copy link

Hi @neilcampbell @bethesque ,

We have few Microservices talking to each other via Kafka topic messages only, no direct interaction.
We want to do contract testing for these message interactions. I looked for few examples on how people are doing this and found example like this:
https://dius.com.au/2017/09/22/contract-testing-serverless-and-asynchronous-applications/

So they are referring a MessagePact, is this supported in Pactnet?

Regards,
Vikas

@vikasillumina
Copy link
Author

Hi @neilcampbell @bethesque please can you look into this request?

@neilcampbell
Copy link
Member

Hi @vikasillumina Sorry for the late reply.
At this stage it is not supported in PactNet. I believe only Pact-JVM has support for message pact at the moment.

@isayneigh
Copy link

Is this something that is being considered by the PactNet team? If so, is there an ETA? Otherwise, would you be able to explain why it won't be supported?

@neilcampbell
Copy link
Member

Yeah it would definitely be a nice addition. No ETA unfortunately, I haven't yet looked into what is involved or if the ruby core that we currently use even supports it yet. I have asked a couple of questions and will report back the findings. It would be awesome if someone here is interested in adding support?

@isayneigh
Copy link

pact-foundation/pact-ruby#177 (comment)

Potentially not something that's feasible to be worked on until the move to a Rust implementation? (based on the above comment). I'd be willing to contribute to the effort, however i'm unfamiliar with Ruby and if that's required it might be more quickly accomplished by someone within the pact-foundation team.

@neilcampbell
Copy link
Member

Apparently the ruby core does have support. There is a PoC and some more info https://github.com/pact-foundation/pact-message-demo and https://gist.github.com/bethesque/c858e5c15649ae525ef0cc5264b8477c if you'd like to take a look?

@nirpet
Copy link

nirpet commented Nov 6, 2018

H ,
I looked into it and managed to create a working example. There is still some work left. Hopefully I'll manage to finish it and create a pull request in the next couple weeks

@bartschotten
Copy link

Any update on this? Would supporting message contracts also imply supporting the 3.0 specification as a whole?

@nirpet
Copy link

nirpet commented Feb 7, 2019

Hi, @bartschotten.
@neilcampbell and I are still working on some fixes before we will merge the pull request and enable message pacts support.
You can keep track of our progress by subscribing to this thread: #175
There are some more features that have to be implemented in order to support the 3.0 specification as a whole, they are not included in this pull request.

@carl-thomas
Copy link

Is there any ETA on when this will be released?
Or is there a beta version that can be used/created?

@bartschotten
Copy link

You can build/publish the branch yourself (#175). I've been able to get it to work for some basic scenarios.

@carl-thomas
Copy link

Thanks @bartschotten I have downloaded it myself and followed the ZooEventsConsumer.Tests but I am receiving the error

PactNet.PactFailureException : Pact verification failed. See output for details. 
If the output is empty please provide a custom config.Outputters (IOutput) for your test framework, as we couldn't write to the console.

I have set up the XUnitOutput but I still get the same error. Do you have any ideas what can be causing this?

@neilcampbell
Copy link
Member

neilcampbell commented Mar 11, 2019

@carl-thomas Setting up the XUnitOutput won't fix the exception. That exception is just letting you know there is an error and "If" you can't see the details it's because an Outputter hasn't been set up to write it out. If you have done it correctly, you should now see the underlying error that was occurring.

@carl-thomas
Copy link

@neilcampbell I just ran the code on a Windows OS and the tests pass successfully. I was using PactNet.Osx as I am running this code on a MacOS and it looks like it is failing using this OS. I assume that this has not been tested on MacOS?

@carl-thomas
Copy link

@neilcampbell @bartschotten do you have any idea why this would not run on MacOS? Do you have any ideas where this issue could be coming from and how I might be able to solve it? Thanks

@neilcampbell
Copy link
Member

neilcampbell commented Mar 21, 2019

@carl-thomas I'm not sure, we probably need a bit more information about the error you see.

@bartschotten
Copy link

bartschotten commented Jun 11, 2019

@neilcampbell @bartschotten do you have any idea why this would not run on MacOS? Do you have any ideas where this issue could be coming from and how I might be able to solve it? Thanks

@carl-thomas Could you check with the latest version of the branch? I've fixed an issue on Linux, which I suspect could also solve your problem.

@arindamdat
Copy link

@neilcampbell , any plan to merge the "message-pact" branch back to master in near future?

@adamrodger
Copy link
Contributor

This support will be added in 4.x

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

8 participants