Can I use API contract testing for events?

While implementing asynchronous events with AWS (SQS & SNS). My team asked whether they could implement contract testing for events to verify the messages being sent follow the contract defined.

Absolutely Pact supports testing events as part of your contract testing (How Pact works | Pact Docs)

Who has used contract testing for testing events in the wild? Would love to hear your stories and challenges while implementing this approach.

1 Like