Home

Awesome

JMeter gRPC Request

<p align="center"><img src="./dist/asset/jmeter-and-grpc.png" width="600px" alt="Apache JMeter and gRPC logo" /></p> <h4 align="center">This sampler JMeter lets you send an gRPC request to a server. </br> It's as simple as a HTTP Request.</h4> <br>

Javadocs Stack Overflow

简体中文 | English

What is it

This is a simpler of JMeter used to test for any gRPC server, it is not necessary to generate gRPC classes or to compile the protos binary for the service. Just a very simple for input:

Same as JMeter HTTP Request but for gRPC. Copy only once file jar to lib/ext of JMeter, select your protobuf folder and start making requests! No extra steps.

The JMeter gRPC Request is available at JMeter Plugins Manager, we can find here https://jmeter-plugins.org/?search=jmeter-grpc-request

Features

Todo:

Usage

<p align="center"><img src="./dist/asset/jmeter-grpc-create-testscript.gif" width="820px" alt="jmeter-create-testscript-grpc" /></p>

Requirements

All you need copy jmeter-grpc-request file jar to directory lib/ext of JMeter and restart JMeter GUI (copy once, use forever). Binary are available from the Releases Page.

Making a gRPC request with JMeter

Create test script:

Run test:

Configurations

No.FieldsDescription
1Server Name or IPDomain/IP for gRPC server
2Port NumberPort for gRPC server (80/ 443)
3SSL/TLSSSL/TLS to authenticate the server
4Disable SSL/TLS Cert VerificationDisable SSL/TLS certificate verification (enable this function when using self-signed certificates)
5Proto Root DirectoryRoot directory contains proto files
6Library Directory (Optional)Using a different underlying library (googleapis)
7Full MethodFull Method to test
8MetadataMetadata can be use for Store token, authentication method, etc. <br/>Two Ways to use metadata, <br/><br/>  <b>1. Comma separated Key:Value : </b><br/>  - key1:value1,key2:value2<br/>  - Value should url encode with utf-8 <br/><br/> 2.<b> Json String : </b><br/>   - {"key1":"Value1", "key2":"value2"} <br/><br/> <b>Note: <i>In gRPC Metadata value is (Key, value) both in format of (String, String), in case of nested Json Objects values, will go to request as a JsonString. </i></b>
9DeadlineHow long gRPC clients are willing to wait for an RPC to complete
10Send JSON Format With the RequestData request with JSON format

Running the examples

Example invocations can be found in the example directory.

Benchmark

Purpose verify that jmeter-grpc-request is really stable when performing load testing for the gRPC system. Read more Benchmark: jmter-grpc-request

<img src= "./dist/asset/report-120-1800s.jpg" />

Build instructions

Build requirements

In order to build JMeter GRPC Request from source, you will need:

Build from source

Build a (fat) jar output in target directory, run:

mvn clean install package

Inspiration...