gRPC testing tools, by the job they do
"gRPC testing" covers three different jobs. To call a service by hand and check what comes back, use a client: istek, Kreya, Postman or grpcurl. To see how it holds up under load, use ghz or k6. To keep a client and a server in agreement, use Pact with its protobuf plugin, or GripMock for a mock server. istek does only the first job.
Updated
At a glance
| Job | Tools | How you write the test |
|---|---|---|
| Call by hand and read the reply | istek, Kreya, Postman, grpcurl, grpcui | You don't: send a request, read the response, its status, headers and trailers |
| Scripted checks on a response | Postman; Kreya on its Pro and Enterprise plans | Scripts that run with the request: in Postman, before invoking and after the response |
| Load and performance | ghz, k6 | ghz: command-line flags or a config file. k6: JavaScript using its k6/net/grpc module |
| Contract tests | Pact with the protobuf plugin | Consumer tests that record the expected calls, verified against the real server |
| A mock server | GripMock | Stubs, served by a mock built from your .proto files |
Calling by hand
This is the everyday loop while you build a service: point a client at localhost:50051, send a request, read the status and the reply, change one field, send again. What matters is server reflection or .proto import, all four call types, headers and trailers, and TLS. gRPC clients for the Mac compares them on each.
- istek: a native Mac app for gRPC, $29 once. Reflection or
.protofiles, every stream type, headers and trailers for every call, mutual TLS. - Kreya: a cross-platform client for gRPC, REST and more, with a free plan; scripting and tests are on its paid plans.
- Postman: a general API platform with gRPC support and scripts before invoking and after the response.
- grpcurl: the free command-line client, and the one to put in a script or CI. grpcurl examples covers the everyday commands.
- grpcui: grpcurl's companion, a web UI served on localhost.
Load testing
ghz is a free command-line tool and Go package for load testing and benchmarking gRPC services. It loads the schema from a .proto file, a protoset or server reflection. k6 has had a built-in gRPC module, k6/net/grpc, since v0.29.0, and its tests are JavaScript.
Contract tests and mocks
Pact's protobuf plugin extends Pact to protobuf messages and gRPC calls, so a client team's expectations can be checked against the server before either ships. GripMock is a mock gRPC server that builds the service from a .proto file and answers from stubs, for end-to-end tests or while the real server is not ready.
Where istek fits
istek is for the first job only: calling a service you are building, many times a day, and reading exactly what came back, including the trailers where errors carry their details. When a call misbehaves, Copy as grpcurl turns it into a command you can paste into a script or a bug report.
When another tool is the better fit
- Load or performance tests: ghz or k6. istek has no load-testing mode.
- Contract tests between teams: Pact with the protobuf plugin.
- A stand-in server for tests: GripMock.
- Mac only: macOS 14 or later on Apple Silicon. If anyone on the team is on Windows, Linux or an Intel Mac, pick a cross-platform client.
- Native gRPC over HTTP/2 only. For gRPC-Web or Connect endpoints, use a client that speaks those protocols.
- No CLI, scripted tests or CI mode. Keep grpcurl for scripts; istek hands any call to it with Copy as grpcurl.
- No shared workspaces or sync. Everything stays on the Mac it runs on, which is the point, but a team that shares collections will want Postman.