pact-foundation / pact-js

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
https://pact.io
Other
1.62k stars 345 forks source link

Feature: Asynchronous Message support #166

Closed mefellows closed 6 years ago

mefellows commented 6 years ago

Add support for asynchronous communication, including but not limited to the following types of integrations:

TODO:

See https://github.com/pact-foundation/pact-go/issues/74 for the Golang beta launch.

bethesque commented 6 years ago

I would call this an alpha if you're planning on releasing before I get the v3 parsing/writing done.

mefellows commented 6 years ago

Thanks, I actually have it set as alpha in the package.json, for some reason I keep saying beta!

On Fri, Mar 30, 2018 at 8:01 PM, Beth Skurrie notifications@github.com wrote:

I would call this an alpha if you're planning on releasing before I get the v3 parsing/writing done.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/pact-foundation/pact-js/issues/166#issuecomment-377482858, or mute the thread https://github.com/notifications/unsubscribe-auth/AADSjHjc5KiN4PoEhMMnSuSGT4TfjoZBks5tjfR8gaJpZM4TBaZG .

-- Matt Fellows

mefellows commented 6 years ago

Alpha builds now setup to push on tag with version: 6.0.0-alpha.x, and tagged with prerelease in npm:

screenshot

mefellows commented 6 years ago

serverless-logo

mefellows commented 6 years ago

Noticed an issue in the consumer test, when using matchers, the body yielded to the consumer contains all of the marshalled Ruby structures instead of the generated values.

Need to reverse that process at this point in time

davidlivingrooms commented 6 years ago

Does the alpha build support rabbitmq? I would like to test this out!

mefellows commented 6 years ago

@davidlivingrooms it sure does! Check out the initial docs at https://github.com/pact-foundation/pact-js/tree/feat/message-pact/#asynchronous-api-testing

In short, we support all of these tools - including Rabbit - by not caring about the specific protocol and focussing on the messages themselves.

There are two examples to look at, but perhaps start with this one and see if you can bend it into shape.

If you're super keen, a PR with an example would be awesome ;)

WARNING: this is early days, so the documentation and examples will need to be uplifted - but given you want to test this out I'm hoping you're willing to push through some of this :)

mefellows commented 6 years ago

@davidlivingrooms - have you had a chance to take a look at the API? I've been shipping it around at work, but would appreciate some unbiased/external opinions.

@mboudreau yours too, if you have time :)

davidlivingrooms commented 6 years ago

@mefellows I have not yet! I'll make time soon. Looking forward to it 😄

mefellows commented 6 years ago

FYI - code is now being moved to a mainline release branch in preparation for official support: https://github.com/pact-foundation/pact-js/tree/6.x.x, based on feat/message-pact which will be deleted shortly