Contract Testing Google Pub/Sub: Using AsyncAPI specs as Executable Contracts
Channel: ConfEngine
Date: 17/04/2024

Want to Shift-Left the identification of integration issues in applications built with Event Driven Architecture (EDA)? What if we told you that we can use AsyncAPI specifications as Executable Contracts to achieve this? In this demo we go over how we can leverage AsyncAPI specification as Executable Contract to run tests against microservices that interact via Google Pub/Sub.

Key points covered:
1. Message count and schema validation: Verify that your micro-service is sending and receiving the expected number of messages and appropriate channels mentioned in AsyncAPI spec. Also ensure that these messages are schema valid as per AsyncAPI spec.

2. Executable Contracts: Learn how Specmatic leverages your AsyncAPI specifications to automatically generate and execute contract tests, ensuring your services communicate correctly through published and subscribed topics.

3. CI/CD Integration: Witness contract testing in action and see how easily this practice can fit into your Continuous Integration pipeline, providing critical insights early and often in your development cycle.

Github Repo: https://github.com/znsio/specmatic-google-pubsub-sample

Discover more:
Kafka mocking with AsyncAPI: https://confng.in/a6Cy_FmB 
Specmatic API Coverage Report: https://confng.in/ppjezyns
Embrace your API potential with Specmatic: https://specmatic.io