• This repository has been archived on 04/Apr/2024
  • Stars
    star
    177
  • Rank 214,681 (Top 5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JMeter gRPC Request load test plugin for gRPC

JMeter gRPC Request

Apache JMeter and gRPC logo

This sampler JMeter lets you send an gRPC request to a server.
It's as simple as a HTTP Request.


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:

  • Host and port of gRPC service.
  • Method of service needs testing.
  • Folder path of proto files.
  • Data request in JSON format.

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

  • Supports Blocking Unary Calls.
  • Parses proto files at runtime.
  • Supports plain text and TLS connections.
  • Supports authentication via metadata (JWT/Token).
  • Request data with JSON format.
  • Runs on Mac, Linux and build project by Maven.

Todo:

  • Supports TLS connections.
  • Supports authentication via metadata.
  • Auto list full methods.
  • Count the failed request in the report.
  • Auto generate request data base on proto file.
  • Supports grpc-web protocol (HTTP1.1).

Usage

jmeter-create-testscript-grpc

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:

  • Add Thread Group: right-click on the Sample Test (our Test Plan) → Add → Threads (Users) → Thread Group.
  • Add GRPC Request: right-click on the newly created Thread Group → Add → Sampler → GRPC Request.
  • Fill info request: host, port, method, data request, proto folder.
  • Save test script.

Run test:

  • Via JMeter GUI: in top bar click Run → Start.
  • Via command line: bin/jmeter -n -t <test JMX file>.jmx -l <test JMX result>.csv -j <test log file>.log -e -o <Path to output folder>.

Configurations

No. Fields Description
1 Server Name or IP Domain/IP for gRPC server
2 Port Number Port for gRPC server (80/ 443)
3 SSL/TLS SSL/TLS to authenticate the server
4 Disable SSL/TLS Cert Verification Disable SSL/TLS certificate verification (enable this function when using self-signed certificates)
5 Proto Root Directory Root directory contains proto files
6 Library Directory (Optional) Using a different underlying library (googleapis)
7 Full Method Full Method to test
8 Metadata Metadata can be use for Store token, authentication method, etc.
Two Ways to use metadata,

 1. Comma separated Key:Value :
  - key1:value1,key2:value2
  - Value should url encode with utf-8

 2. Json String :
   - {"key1":"Value1", "key2":"value2"}

Note: 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.
9 Deadline How long gRPC clients are willing to wait for an RPC to complete
10 Send JSON Format With the Request Data 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

  • CCU: 120 user
  • Duration: 30 min

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...

More Repositories

1

go-advanced

A small Vietnamese Go book compiled by ZaloPay teams.
757
star
2

effective-engineer

Works smarter but not harder
93
star
3

hey-app

A professional chat app built on top of ReactJs and Vertx
Java
49
star
4

docker-grpc-gateway

Build grpc-gateway with docker
Go
42
star
5

jmeter-grpc-plugin

A JMeter plugin supports load test gRPC
Java
42
star
6

backstage-grpc-playground

A backstage plugin support gRPC playground for API entities and can be run as standalone app
TypeScript
33
star
7

godbee

An experimental & simple key-value service written in Go/C++
C++
28
star
8

zpd

A simple SQL-like database built on top of Key-Value storages
Go
23
star
9

zalopay-edu

Our open source training material
Java
21
star
10

tokeny

Minimal TOTP generator from your Shell
Go
19
star
11

zalopay-nodejs

ZaloPay NodeJs library
TypeScript
13
star
12

mocker-k1s

Create your docker and kubernetes engine
Shell
13
star
13

db-evaluations

Database re-evaluation for TiDB, YugabyteDB
Java
12
star
14

cannon

Cannon is a benchmark system. The aim is to build a multi-tenant system which provides intuitive UI/UX for users to submit tasks and perform benchmark.
Go
11
star
15

terraform-provider-nacos

Terraform Provider for Nacos
Go
8
star
16

zalopay.js

JavaScript library for ZaloPay Mobile App
6
star
17

dojo

Simple application to support VTF 2020
CSS
6
star
18

backstage-grpc-playground-backend

A backstage backend plugin support gRPC playground for API entities and normal requests
TypeScript
5
star
19

blake3-jni

JVM bindings for BLAKE3 hash
Assembly
5
star
20

project-uniform

Designs for our team's t-shirts.
4
star
21

react-grpc-web

This is a repo to demo how to implement gRPC-Web to ReactJS application.
JavaScript
3
star
22

homebrew-tap

ZaloPay OSS's Homebrew tap
Ruby
2
star