postman-open-technologies / microcks

This is a repo for managing our microcks partnership.
Apache License 2.0
1 stars 0 forks source link

Multi-Protocol Testing #2

Open kinlane opened 2 years ago

kinlane commented 2 years ago

I would like to do a story on multi-protocol testing, prepare for a blog post, but then consider using for a Breaking Changes TL;DR episode.

lbroudoux commented 2 years ago

We call multi-protocol testing in Microcks the ability to support multi-bindings in AsyncAPI event-driven API.

The initial support of AsyncAPI in Microcks was highly coupled to Kafka support : an imported AsyncAPI was mocked using Kafka broker and protocol only. But in subsequent releases (from 1.2 to 1.4) we changed the way protocol bindings are handled to have loose coupling and thus introduced the support of other protocols like MQTT and WebSocket.

Hence in Microcks, an AsyncAPI can be simulated / mocked and tested onto multiple protocoles depending on its actual bindings. You can also have a default protocol binding which mean that in case your AsyncAPI file doesn’t specify a protocol binding (yet), you can assign it to the broker / technology of choice.

Conformance test launching in Microcks imply specifying an endpoint URI. Depending of the URI scheme (ws:// , wss://, Kafka://, mqtt://), Microcks is handling the correct endpoint protocol connection so that you can ensure that your events are respectful of the referred AsyncAPI schema (JSON or Avro) whatever the transport layer.

Thanks to CI/CD plugins or actions (see Automating | Microcks.io) it’s then easy to define pipelines that launch parallel tests on different protocols and then merge only if all transports are checked as conformant.