Pact-js: Feature: Asynchronous Message support

Created on 30 Mar 2018  Â·  10Comments  Â·  Source: pact-foundation/pact-js

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

  • Publish/Subscribe via message queues (e.g. Kinesis, SNS, MQ)
  • WebSockets where messages may originate from client or server and _in any order_
  • AWS Lambda or other "serverless"-like environments

TODO:

  • [x] Spike out producer and consumer side
  • [x] Release latest Ruby standalone (1.33.0+ with message-pact and latest verifier)
  • [x] Create example project that runs part of CI
  • [x] Release as beta in parallel with master
  • [x] Update documentation
  • [ ] Ensure sufficient test coverage
  • [x] Handle provider states during verification
  • [ ] Review all TODOs in the code
  • [x] Port in change from #178
  • [x] Deprecate 4.x.x branch in npm in preparation for release of 6.x.x

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

Most helpful comment

@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 :)

All 10 comments

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

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

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

screenshot

serverless-logo

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

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

@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 :)

@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 :)

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

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

Was this page helpful?
0 / 5 - 0 ratings