Kafka and JMS Mocking with AsyncAPI using Specmatic
summary
Specmatic uses AsyncAPI and OpenAPI files to spin up in‑memory Kafka and JMS mocks, auto-generate tests, set expectations and verify message counts, topics and schemas. A live demo shows a test that expects three messages on topic product queries and fails when none arrive, flags a mispublished message on the wrong topic, and rejects an unexpected field with the error payload.price was unexpected. The setup runs locally or in CI and produces API coverage and contract verification.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:46Reference architecture
- 3:33Mocking with API specs
- 5:18Live demo setup
- 7:21Testing Kafka interactions
- 10:33Verifying message expectations
- 14:37Kafka mock validations
- 17:53Testing with AsyncAPI
- 21:08Mocking insufficient for contracts
- 22:54Treat specs as code with Git
- 25:00Pulling specs from repo
- 26:24Architecture insights
- 28:09Beyond Kafka mocking
- 29:13Q&A
related talks
22mStrategies for Generating Dynamic, Realistic Mocks for Messaging APIs
24mUsing API spec as an Executable Contract To Mock and Test Microservices
24mFrom REST to Events: API Workflow Testing & Mocking with a Single Arazzo Spec
50mContinuous API Mocking and Testing with Microcks, Keptn, and Testkube
52mContract-Driven Development for Event-Driven Architecture.
44mSeamless Upgrades: Mastering API Compatibility
30mBreak the API Test Data Bottleneck: Real Scenarios on Real Systems
22mA Mock Is a Promise: Making GraphQL Mocks Enforceable
