Load .proto files directly, express payloads as JSON, and test all four gRPC modes — unary, server streaming, client streaming, and bidirectional — with the same Karate syntax you use for REST.
Feature: User service gRPC tests
Background:
* host 'grpc.example.com:443'
* proto 'proto/user.proto'
* ssl true
Scenario: Create user (unary call)
Given rpc 'UserService.Create'
And request
{ name: 'Jane', email: 'jane@test.com' }
When method grpc
Then match response ==
{ id: '#number', created: '#notnull' }
Scenario: Server streaming call
Given rpc 'UserService.ListUsers'
And request { limit: 10 }
When method grpc
Then match each responses ==
{ id: '#number', name: '#string' }
gRPC-Specific Features
Unary, server streaming, client streaming, and bidirectional streaming — all with the same consistent syntax. No mode-switching boilerplate.
Point Karate at your .proto files and go. No protoc build step, no generated stubs to commit, no classpath headaches.
Express requests as plain JSON — Karate handles the binary encoding. Assert against responses with fuzzy JSON matching.
Built-in support for mTLS, bearer tokens, and custom metadata headers. Certificate management handled through standard Karate config.
Test a gRPC call, publish to Kafka, verify the HTTP side-effects — all in the same scenario. Polyglot microservices, unified testing.
Run thousands of gRPC tests in parallel. Reuse the same feature files as Gatling load tests — no separate perf harness.
When to Use gRPC Testing
Verify service contracts across languages — Go, Java, Python, Node — without language-specific test harnesses.
Test long-lived bidirectional streams like live feeds, chat, or telemetry ingestion — with timing assertions and flow control.
Validate gRPC traffic through Istio, Linkerd, or Envoy. Assert on headers, retry behavior, and circuit-breaker responses.
Load multiple .proto versions in the same test to verify forward and backward compatibility as schemas evolve.
Licensing
Karate gRPC requires an Enterprise runtime license for CI/CD deployment and the Pro tier of IntelliJ or VS Code plugins for development.
Book a 30-minute demo tailored to your gRPC stack — protos, modes, auth, and all.