Skip to main content

Basic gRPC Request

k6 supports testing gRPC services using the k6/net/grpc module:
You need a running gRPC server to test against. The example uses a test server from the k6 repository.

Setting up gRPC Client

1

Create client and load proto file

2

Connect to server

3

Make requests

4

Close connection

Client Streaming

Test gRPC client streaming with k6:

Stream Event Handlers

gRPC streams support event-driven programming:

Configuration Options

Customize gRPC client behavior:
gRPC testing requires the protocol buffer definition file (.proto) for the service you’re testing.