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.
Highlights
- 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.
https://youtu.be/xapqNmZoolE?si=3jSmMN3BaXIljT9E
Enterprise
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 info@karatelabs.io to discuss your runtime license requirements.
For development, a Pro version of the official Karate Lab IDE plugin is required (IntelliJ and VS Code).
Get Started Now
For more details on setting up and how to get started with the Kafka support, refer to the official documentation.
Coming Soon
This is just the beginning. We are working on gRPC, websocket and webhook support. Support for testing databases of all kinds. Stay tuned.
Happy testing!