Karate Labs Enterprise | Async API Testing

Test event-driven
systems with the
Karate you know.

One DSL, five protocols, zero glue. Mix HTTP with Kafka, gRPC, WebSocket, Webhook or SSE in one test, no Java helpers.

Kafka • gRPC • WebSocket • Webhook • SSE • Enterprise runtime license required

order-flow.feature
Feature: End-to-end order flow

Scenario: HTTP request triggers Kafka event
  # 1. Submit order via REST
  Given url 'https://api.shop.com/orders'
  And request { item: 'Laptop', qty: 1 }
  When method post
  Then status 201

  # 2. Listen for Kafka event
  Given topic 'orders.created'
  When listen 5000
  Then match listen.value ==
    { orderId: '#notnull', status: 'PENDING' }

  # 3. Verify state via gRPC
  Given rpc 'OrderService.GetStatus'
  And request { id: listen.value.orderId }
  When method grpc
  Then match response.status == 'PENDING'

Protocols Supported

Five protocols. One framework.

Pick the protocol your system uses, or all five. Every capability works the same way, with the same syntax.

Enterprise

Kafka

Test event-driven architectures with native Kafka support. Avro, multiple listeners, parallel consumers.

Given topic 'orders.created'
And value { id: 1, status: 'NEW' }
When send
# Listen on another topic
Given topic 'orders.processed'
When listen 5000
Then match listen.value.status
      == 'COMPLETE'
  • Avro schema & binary serialization
  • Multiple concurrent listeners
  • Consumer group management
  • SASL & mTLS authentication
Explore Kafka testing
Enterprise

gRPC

First-class gRPC testing with all four modes. Load .proto files directly: no codegen.

Given proto 'user.proto'
And rpc 'UserService.Create'
And request
  { name: 'Jane', role: 'admin' }
When method grpc
Then match response ==
  { id: '#number', created: '#notnull' }
  • All 4 modes: unary, server-, client-, bidi-streaming
  • Direct .proto loading, no codegen
  • Automatic Protobuf ↔ JSON conversion
  • SSL / TLS with cert management
Explore gRPC testing
Enterprise

WebSocket

Test chat-bots, live dashboards, and real-time apps. Multiple concurrent connections with flow control.

Given ws 'wss://chat.example.com/room/1'
And send
  { type: 'msg', text: 'Hello' }
When receive 3000
Then match receive ==
  { type: 'ack', id: '#string' }
  • Multiple concurrent connections
  • Custom message types & wire formats
  • Flow control & backpressure
  • WSS (TLS) & auth headers
Explore WebSocket testing
Enterprise

Webhook

Test the callbacks your system sends. An in-process receiver captures the inbound call so you can wait for it and assert on it, in the same test that triggered it.

  • In-process receiver, no tunnel or public URL
  • Wait for the callback, then assert on headers & body
  • Trigger with HTTP, verify the callback in one scenario
  • JSON assertions with the same match syntax
Part of the Async Protocol Pack
Enterprise

SSE

Server-Sent Events: subscribe to an event stream, wait for the event you expect, and assert on it. Pure HTTP streaming, no extra infrastructure.

  • Subscribe to any text/event-stream endpoint
  • Wait for a named event or a matching payload
  • Ordered events, assert on each or on the final state
  • Mix with HTTP calls in the same test
Part of the Async Protocol Pack

Why Karate for Async

One DSL. Five protocols. Zero glue code.

Async testing in traditional frameworks means writing custom threading, serializers, and wire-format handlers. With Karate, it's the same syntax you use for REST.

Unified Syntax

Express Kafka messages, gRPC payloads, and WebSocket frames as JSON. Assert with the same fuzzy matchers as REST.

Mix HTTP & Async

POST a REST call, wait for a Kafka event, verify via gRPC: all in the same scenario. End-to-end flows across your entire stack.

Parallel Execution

Built-in parallelism for async tests too. Run thousands of concurrent listeners or streams without threading bugs.

Built-in Performance Testing

Re-use async tests as load tests via the Gatling integration. No separate performance tooling required.

SSL / TLS & Auth

Production-grade security out of the box. mTLS, SASL, bearer tokens, and SSL cert management across Kafka, gRPC and WebSocket.

Zero Glue Code

Wire-format conversion, Avro schemas, Protobuf decoding: all handled automatically. No custom serializers to maintain.

Capability Matrix

What's supported, at a glance

Shared core capabilities across Kafka, gRPC and WebSocket, plus protocol-specific features where it matters. Webhook and SSE use the same JSON assertions, HTTP mixing and parallel execution.

Capability Kafka gRPC WebSocket
JSON data & assertions
Mix with HTTP in same test
Parallel execution
Performance testing (Gatling)
SSL / TLS
Multiple concurrent connections/listeners
Binary payloads (Avro / Protobuf) Avro Protobuf ·
Bidirectional streaming ·
Consumer group management · ·

Licensing

Async API testing is a Karate Labs Enterprise capability

Requires an Enterprise runtime license for CI/CD deployment and IDE Pro for the IntelliJ or VS Code plugin for local development. Pricing scales with your team size and deployment model.

Get Pricing

"We replaced a 2,000-line custom Kafka test harness with Karate in a single sprint. Our event-driven tests now run alongside REST tests in the same pipeline, with the exact same syntax."

JM

James Moreno

Platform Lead, Global Payments Co.

Ready to test your async stack?

Book a demo and we'll walk you through Karate async testing for your protocols, your infrastructure, and your compliance requirements.