GithubHelp home page GithubHelp logo

jmeter-grpc-request's Introduction

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 an HTTP Request.


Javadocs Stack Overflow

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.

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.
  • Supports grpc-web protocol (HTTP1.1).
  • Auto generate request data base on proto file.

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 dist/bin directory.

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 Proto Root Directory Root directory contains proto files
5 Library Directory (Optional) Using a different underlying library (googleapis)
6 Full Method Full Method to test
7 Metadata Store token, authentication method
8 Deadline How long gRPC clients are willing to wait for an RPC to complete
9 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...

jmeter-grpc-request's People

Contributors

anhldbk avatar dependabot[bot] avatar huynhminhtan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.