# Can I use API contract testing for events?

**URL:** <https://club.ministryoftesting.com/t/can-i-use-api-contract-testing-for-events/55696>\
**Category:** Archive\
**Tags:** api-testing, microservices\
**Created:** [29 December 2021 10:59 UTC](https://club.ministryoftesting.com/t/can-i-use-api-contract-testing-for-events/55696 "2021-12-29T10:59:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prescottlewis707](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/prescottlewis707/32/11515_2.png) [@prescottlewis707](https://club.ministryoftesting.com/u/prescottlewis707)\
**Post date:** [29 December 2021 10:59 UTC](https://club.ministryoftesting.com/t/can-i-use-api-contract-testing-for-events/55696/1 "2021-12-29T10:59:22Z")

</div>

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](https://docs.pact.io/getting_started/how_pact_works/#how-to-write-message-pact-tests))

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