Testing for Async API
The rise of Event Driven Architectures requires API testing to go beyond plain HTTP and JSON. Such systems are harder to test because:
- Need to punch through more architecture layers.
- Listening for messages on separate threads and filtering out un-wanted messages becomes a key concern.
- Checking for expected results is harder because of low-level data formats such as Avro or custom data-serialization schemes.
Testing asynchronous systems requires a very different approach as compared to the simple request-response model of REST over HTTP and GraphQL.
Kafka Support in Karate
We are pleased to announce the launch of testing async systems, starting with Kakfa, as an enterprise feature.
Kafka and async support in Karate is the result of observing how teams use Karate in complex testing contexts, taking their feedback on what more they would like to see built-in Karate.
Karate makes HTTP testing easy with a carefully crafted DSL (Domain Specific Language). Kafka support continues this tradition with special keywords such as “topic” and “produce”. There is no need for writing custom glue code to handle messages and formats, and everything you need is built in.
- Unified focused on Kafka and future-ready
- Flexibility to set up multiple async listeners
- Support for parallel execution
- Support for performance testing
- Express data and assertions as JSON
- Avro or plain JSON serialization support
- Use Avro schemas directly, no code-generation required
Watch a demo of Kafka testing in Karate here.
Native support for Kafka testing requires purchase of a runtime license. It is designed to run tests easily and securely in CI/CD without the need for an online license validation step. Please contact us at email@example.com to discuss your runtime license requirements.
Get Started Now
For more details on setting up and how to get started with the Kafka support, refer to the official documentation.
This is just the beginning. We are working on gRPC, websocket and webhook support. Support for testing databases of all kinds. Stay tuned.