pact-foundation / pact-specification

Describes the pact format and verification specifications
MIT License
298 stars 29 forks source link

Events driven architecture like aws event bridge contract testing #100

Open GZLiew opened 2 years ago

GZLiew commented 2 years ago

Hi

AWS has event bridge that has both a publisher and a subscriber for events in an Event Store

I would like to implement Pact specification on our microservices so we can run contract testing on our events published to and consumed from Event Bridge.

Most examples I saw currently is based on REST or Graphql.

Would like to know if this is achievable as Event Bridge has JSON schemas

mefellows commented 2 years ago

Pact now support synchronous messages (#86) which you could use for event systems, along with existing support for Asynchronous messages.

You can now also extend pact via Plugins (#83.). Between these three things, you should be able to cover any of the above use cases (I don't think you need plugins for this, but you might like to create a custom capability that makes it more ergonomic to work with it).