简体中文 | English
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
Todo:
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.
Create test script:
Run test:
bin/jmeter -n -t <test JMX file>.jmx -l <test JMX result>.csv -j <test log file>.log -e -o <Path to output folder>
.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 |
Example invocations can be found in the example directory.
Purpose verify that jmeter-grpc-request is really stable when performing load testing for the gRPC system. Read more Benchmark: jmter-grpc-request
In order to build JMeter GRPC Request from source, you will need:
Build a (fat) jar output in target directory, run:
mvn clean install package