Code Monkey home page Code Monkey 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 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...

jmeter-grpc-request's People

Contributors

amoratinos avatar anhldbk avatar dependabot[bot] avatar dhartford avatar huynhminhtan avatar jayrajgondaliya avatar ling5821 avatar minhhoangvn avatar pengweiqhca avatar totalys avatar xander34 avatar yanpaulo avatar yl-yue avatar zarric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jmeter-grpc-request's Issues

gRPC request cut JSON fields with emty values

Hello!
Trying to use gRPC plugin for some perfomance testing on our server.
I'm trying to send some JSON with several fields for request e.g. :
{
"filterByStatus": [],
"totalsByStatus": [],
"date": "2021-07-28T00:00:00.000Z",
"offset": 0,
"limit": 12,
"sortBy": "",
"sortDirectionDesc": false,
"vName": "",
...
"lName": ""
}
this is general request to get everything for current date.
So, i've added View Results Tree sampler for debug and it show me request body as:
{
"date": "2021-07-28T00:00:00Z",
"limit": 12
}

I need send all fields, because in over case server just returns me OK. 200. instead of data set.

Could you please help me solve this problem ?

Add support for closing stream when a number of messages is received

When used with gRPC stream services, basically the client needs to close the stream when it have all the needed responses and does not plan to issue new requests.

Currently this can only be handled by the response timeout GUI option of the plugin, which actually results an error. It would be really nice if a new numeric field can be added which will close the connection when certain number of messages are received.

GRPC Request

Hi Team,

Currently we are using the Jmeter-GRPC-request sampler for the gRPC services. but we are not able to perform getting below errors, pls provide your support to overcome this issue.

java.lang.RuntimeException: Caught exception while waiting for rpc
at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:77) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.testbean.GrpcRequest.sample(GrpcRequest.java:42) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1.1 r1855137]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1.1 r1855137]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]
Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Channel Pipeline: [WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:235) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:216) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.core.grpc.DynamicGrpcClient.blockingUnaryCall(DynamicGrpcClient.java:29) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:75) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
... 6 more
Caused by: io.netty.channel.ChannelPipelineException: io.grpc.netty.ProtocolNegotiators$ClientTlsHandler.handlerAdded() has thrown an exception; removed.
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:625) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:573) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:516) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.fireProtocolNegotiationEvent(ProtocolNegotiators.java:949) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler.channelActive(ProtocolNegotiators.java:858) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:204) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1409) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:906) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:307) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:685) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
... 1 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN$Provider
at io.netty.handler.ssl.JettyAlpnSslEngine.newClientEngine(JettyAlpnSslEngine.java:55) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$AlpnWrapper.wrapSslEngine(JdkAlpnApplicationProtocolNegotiator.java:142) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkSslContext.configureAndWrapEngine(JdkSslContext.java:360) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkSslContext.newEngine(JdkSslContext.java:335) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ClientTlsHandler.handlerAdded0(ProtocolNegotiators.java:341) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.handlerAdded(ProtocolNegotiators.java:908) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:964) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:610) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:573) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:516) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.fireProtocolNegotiationEvent(ProtocolNegotiators.java:949) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler.channelActive(ProtocolNegotiators.java:858) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:204) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1409) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:906) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:307) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:685) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
... 1 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.ALPN$Provider
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_251]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_251]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_251]
at io.netty.handler.ssl.JettyAlpnSslEngine.newClientEngine(JettyAlpnSslEngine.java:55) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$AlpnWrapper.wrapSslEngine(JdkAlpnApplicationProtocolNegotiator.java:142) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkSslContext.configureAndWrapEngine(JdkSslContext.java:360) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.handler.ssl.JdkSslContext.newEngine(JdkSslContext.java:335) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ClientTlsHandler.handlerAdded0(ProtocolNegotiators.java:341) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.handlerAdded(ProtocolNegotiators.java:908) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:964) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:610) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:573) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:516) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.fireProtocolNegotiationEvent(ProtocolNegotiators.java:949) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler.channelActive(ProtocolNegotiators.java:858) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:204) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1409) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:225) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:211) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:906) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:307) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:685) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
... 1 more
2020-07-23 16:28:19,622 INFO o.a.j.t.JMeterThread: Thread is done: SingleUser 1-1
2020-07-23 16:28:19,622 INFO o.a.j.t.JMeterThread: Thread finished: SingleUser 1-1
2020-07-23 16:28:19,623 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2020-07-23 16:28:19,623 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, local)

Modifying User-Agent

Hi,

I am trying to pass User-agent in metadata section but it is not working.

Thanks
Yadvendra

Add support for bytes fields

JSON doesn't natively support binary data, which makes bytes fields more or less impossible since you can't put them in the jsonRequest parameter. There's also the problem that bytes fields can be quite large, and you wouldn't really want to put binary data in the JML anyway.

We're using this sampler for a load testing project and want to support binary uploads. I have a few thoughts for how to add that support, and some time to work on it. Before starting, I wanted your thoughts and to know if you'd be accepting of contributions.

My thought is to add a parameter with a field path for the bytes field in the request, a path to a local file with the bytes to set in the field, and perhaps a starting byte offset and length for the read (to support chunking files). Does this sound reasonable?

Thanks!

Method unimplemented

When trying to call the rpc stub following error occurs:

2020-07-28 14:44:51,247 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GrpcRequest'.
java.lang.RuntimeException: Caught exception while waiting for rpc
	at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:77) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.testbean.GrpcRequest.sample(GrpcRequest.java:42) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3]
	at java.lang.Thread.run(Thread.java:830) [?:?]
Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method PACKAGE.SERVICE/METHOD-ONE is unimplemented
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:235) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:216) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.core.grpc.DynamicGrpcClient.blockingUnaryCall(DynamicGrpcClient.java:29) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:75) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	... 6 more

However, the call is recognized by the grpc server:

PACKAGE.SERVICE/METHOD-ONE
2020-07-28 14:44:51.227  INFO 975 --- [ault-executor-0] o.l.springboot.grpc.ais.LogInterceptor   : PACKAGE.SERVICE/METHOD-ONE

My proto looks like this:

package PACKAGE;

service SERVICE {
  rpc METHOD-ONE(Request-one) returns (Response-one) {}
  rpc METHOD-TWO(Request-two) returns (Response-two) {}
}

Here also my JMX:

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
        <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
      </ThreadGroup>
      <hashTree>
        <vn.zalopay.benchmark.testbean.GrpcRequest guiclass="TestBeanGUI" testclass="vn.zalopay.benchmark.testbean.GrpcRequest" testname="GrpcRequest" enabled="true">
          <longProp name="DEADLINE">100000</longProp>
          <stringProp name="FULL_METHOD">PACKAGE.SERVICE/METHOD-ONE</stringProp>
          <stringProp name="HOST_PORT">localhost:6565</stringProp>
          <stringProp name="PROTO_FOLDER">/Users/me/Development/BA/project/src/main/proto</stringProp>
          <stringProp name="REQUEST_FILE">/Users/me/Development/BA/project-requests/Request-one.json</stringProp>
          <boolProp name="TLS">false</boolProp>
          <stringProp name="REQUEST_JSON"></stringProp>
        </vn.zalopay.benchmark.testbean.GrpcRequest>
        <hashTree/>
        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>true</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <sentBytes>true</sentBytes>
              <url>true</url>
              <threadCounts>true</threadCounts>
              <idleTime>true</idleTime>
              <connectTime>true</connectTime>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

In the end, I do not understand how the method is not recognized.
Do you have an idea, why ?
I'm very thankful for every help!

JMeterThread: Error while processing sampler: 'GrpcRequest'

Running on: Windows 10 Enterprise
Jmeter version 5.3

FULL_METHOD: grpc.marketdata.MDRequest.GetQuotes
Folder structure:

packages
    grpc
        marketdata
            MDRequest.proto
            tagget_security.proto
    proto
        marketdata
            marketdata.proto

i set PROTO_FOLDER as path to packages

MDRequest.proto looks like (i hid lines that are not important):
syntax = "proto3";

package grpc.marketdata;

import "google/rpc/status.proto";
import "google/protobuf/field_mask.proto";
import "proto/marketdata/marketdata.proto";
import "grpc/marketdata/tagged_security.proto";

service MDRequest {
rpc GetQuotes(QuotesRequest) returns (QuotesResponse) {}
}

my REQUEST_FILE:
{
"securities":[
{"id": {"security_id": "123456"},"tag":"123456"},
]
}
TLS: false
DEADLINE: 20000

errors i get:

2020-05-28 18:09:26,298 INFO o.j.r.PluginManager: Plugins Status: [jpgc-plugins-manager=1.4, jmeter-core=5.3, jmeter-ftp=5.3, jmeter-http=5.3, jmeter-jdbc=5.3, jmeter-jms=5.3, jmeter-junit=5.3, jmeter-java=5.3, jmeter-ldap=5.3, jmeter-mail=5.3, jmeter-mongodb=5.3, jmeter-native=5.3, jmeter-tcp=5.3, jmeter-components=5.3]
2020-05-28 18:09:27,254 WARN o.a.j.t.BeanInfoSupport: Localized strings not available for bean class vn.zalopay.benchmark.testbean.GrpcRequest
java.util.MissingResourceException: Can't find bundle for base name vn.zalopay.benchmark.testbean.GrpcRequestResources, locale en_EN
	at java.util.ResourceBundle.throwMissingResourceException(Unknown Source) ~[?:1.8.0_241]
	at java.util.ResourceBundle.getBundleImpl(Unknown Source) ~[?:1.8.0_241]
	at java.util.ResourceBundle.getBundle(Unknown Source) ~[?:1.8.0_241]
	at org.apache.jmeter.testbeans.BeanInfoSupport.<init>(BeanInfoSupport.java:126) ~[ApacheJMeter_core.jar:5.3]
	at vn.zalopay.benchmark.testbean.GrpcRequestBeanInfo.<init>(GrpcRequestBeanInfo.java:17) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_241]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_241]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_241]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_241]
	at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_241]
	at com.sun.beans.finder.InstanceFinder.instantiate(Unknown Source) ~[?:1.8.0_241]
	at com.sun.beans.finder.InstanceFinder.find(Unknown Source) ~[?:1.8.0_241]
	at java.beans.Introspector.findExplicitBeanInfo(Unknown Source) ~[?:1.8.0_241]
	at java.beans.Introspector.<init>(Unknown Source) ~[?:1.8.0_241]
	at java.beans.Introspector.getBeanInfo(Unknown Source) ~[?:1.8.0_241]
	at org.apache.jmeter.testbeans.gui.TestBeanGUI.<init>(TestBeanGUI.java:164) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.util.MenuFactory.getGUIComponent(MenuFactory.java:202) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.util.MenuFactory.initializeMenus(MenuFactory.java:151) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.util.MenuFactory.<clinit>(MenuFactory.java:107) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.control.gui.TestPlanGui.createPopupMenu(TestPlanGui.java:94) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:184) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:46) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.3]
	at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_241]
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_241]
	at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_241]
	at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_241]
	at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_241]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_241]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_241]
	at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_241]
	at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_241]
2020-05-28 18:14:22,615 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2020-05-28 18:14:22,615 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-05-28 18:14:22,615 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-05-28 18:14:22,615 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2020-05-28 18:14:22,615 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2020-05-28 18:14:22,865 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2020-05-28 18:14:23,036 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2020-05-28 18:14:23,036 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2020-05-28 18:14:23,036 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2020-05-28 18:14:23,036 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2020-05-28 18:14:23,036 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2020-05-28 18:14:23,036 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2020-05-28 18:14:23,052 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2020-05-28 18:14:23,052 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GrpcRequest'.
java.lang.IllegalArgumentException: Could not extract full service from grpc.marketdata.MDRequest.GetQuotes
	at vn.zalopay.benchmark.core.protobuf.ProtoMethodName.parseFullGrpcMethodName(ProtoMethodName.java:17) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:36) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:30) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.testbean.GrpcRequest.init(GrpcRequest.java:28) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.testbean.GrpcRequest.sample(GrpcRequest.java:34) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]

Unable to resolve service by invoking protoc

Hi,
I am getting the below error with this sampler. Can you please help in troubleshooting this issue?

2021-04-25 00:17:38,015 INFO v.z.j.g.c.GrpcClientSampler: Created GrpcClientSampler
2021-04-25 00:17:38,019 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2021-04-25 00:17:38,020 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2021-04-25 00:17:38,022 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2021-04-25 00:17:38,284 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2021-04-25 00:17:38,285 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2021-04-25 00:17:38,285 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2021-04-25 00:17:38,286 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2021-04-25 00:17:38,287 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2021-04-25 00:17:38,287 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2021-04-25 00:17:38,290 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2021-04-25 00:17:38,291 INFO v.z.b.GRPCSampler: Thread Group 1-1@3895635e-GRPC Request	testStarted
2021-04-25 00:17:39,208 WARN v.z.b.c.p.ProtocInvoker: Protoc invocation failed with status: 1
2021-04-25 00:17:39,209 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: protoc version: 3.10.1, detected platform: osx-x86_64 (mac os x/x86_64)
2021-04-25 00:17:39,209 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: embedded: bin/3.10.1/protoc-3.10.1-osx-x86_64.exe
2021-04-25 00:17:39,209 WARN v.z.b.c.p.ProtocInvoker: [Protoc log] protoc-jar: executing: [/var/folders/4v/ht8prz9n0wl7wv6dvjp2s968lf392v/T/protocjar10133609867773508138/bin/protoc.exe, /opt/GitHub/pay-integrator-api/src/main/proto/com/expedia/payment/integrator/service/v1/integrator_payment_api.proto, -I/opt/GitHub/googleapis-master, -I/var/folders/4v/ht8prz9n0wl7wv6dvjp2s968lf392v/T/polyglot-well-known-types2172559459053989569, -I/opt/GitHub/pay-integrator-api/src/main/proto/com/expedia/payment/integrator/service/v1, --descriptor_set_out=/var/folders/4v/ht8prz9n0wl7wv6dvjp2s968lf392v/T/descriptor40288201410774047.pb.bin, --include_imports]
2021-04-25 00:17:39,209 ERROR o.a.j.t.JMeterThread: Error calling threadStarted
java.lang.RuntimeException: Unable to resolve service by invoking protoc
	at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:54) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:32) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.GRPCSampler.init(GRPCSampler.java:62) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.GRPCSampler.threadStarted(GRPCSampler.java:105) ~[jmeter-grpc-request-1.1.2.jar:?]
	at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:769) [ApacheJMeter_core.jar:5.3]
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) [jorphan.jar:5.3]
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) [jorphan.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:737) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:725) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:252) [ApacheJMeter_core.jar:5.3]
	at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: vn.zalopay.benchmark.core.protobuf.ProtocInvoker$ProtocInvocationException: Got exit code [1] from protoc with args [[/opt/GitHub/pay-integrator-api/src/main/proto/com/expedia/payment/integrator/service/v1/integrator_payment_api.proto, -I/opt/GitHub/googleapis-master, -I/var/folders/4v/ht8prz9n0wl7wv6dvjp2s968lf392v/T/polyglot-well-known-types2172559459053989569, -I/opt/GitHub/pay-integrator-api/src/main/proto/com/expedia/payment/integrator/service/v1, --descriptor_set_out=/var/folders/4v/ht8prz9n0wl7wv6dvjp2s968lf392v/T/descriptor40288201410774047.pb.bin, --include_imports]]
	at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invokeBinary(ProtocInvoker.java:159) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invoke(ProtocInvoker.java:104) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:52) ~[jmeter-grpc-request-1.1.2.jar:?]
	... 10 more
2021-04-25 00:17:39,210 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GRPC Request'.
java.lang.NullPointerException: null
	at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:70) ~[jmeter-grpc-request-1.1.2.jar:?]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3]
	at java.lang.Thread.run(Thread.java:832) [?:?]
2021-04-25 00:17:39,211 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2021-04-25 00:17:39,211 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2021-04-25 00:17:39,212 INFO v.z.b.GRPCSampler: Thread Group 1-1@3895635e-GRPC Request	testEnded
2021-04-25 00:17:39,212 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2021-04-25 00:17:39,212 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

Regards
Debayan

`metadata` value should decode.

In buildHashMetadata() method, if value has , or : char, the method will throw exception.

For example, the W3C trace header:

traceparent: 00-785ccc23896e40dcaa7fefd86bb5324a-92eb2aadf3e44c3b-01
tracestate: client-app-id=svc-basic-dps,client-ip=10.233.79.118

Current metadata string: traceparent:00-785ccc23896e40dcaa7fefd86bb5324a-92eb2aadf3e44c3b-01,tracestate:client-app-id=svc-basic-dps,client-ip=10.233.79.118. If allow encode/decode, metadata string should be: traceparent:00-785ccc23896e40dcaa7fefd86bb5324a-92eb2aadf3e44c3b-01,tracestate:client-app-id%3Dsvc-basic-dps%2Cclient-ip%3D10.233.79.118

grpc ERROR

2022-01-12 18:29:50,856 ERROR o.a.j.s.SampleResult: setEndTime must be called after setStartTime
java.lang.Throwable: Invalid call sequence
at org.apache.jmeter.samplers.SampleResult.setEndTime(SampleResult.java:1107) [ApacheJMeter_core.jar:5.4.3]
at org.apache.jmeter.samplers.SampleResult.sampleEnd(SampleResult.java:1145) [ApacheJMeter_core.jar:5.4.3]
at vn.zalopay.benchmark.GRPCSampler.errorResult(GRPCSampler.java:112) [jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:79) [jmeter-grpc-request.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core.jar:5.4.3]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core.jar:5.4.3]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.4.3]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.4.3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_191

Full method not see my methods in proto files

Good day!
Loaded the grpc plugin and loaded proto files in the "Proto Rot Directories" field, but the full method does not find the methods that are in the proto files. What am I doing wrong??? help me please

Unable to get plugin to run in JMeter

Hi,
I am getting following error when I try to run my GRPC request from JMeter. Can someone please help

ava.util.ServiceConfigurationError: io.grpc.NameResolverProvider: io.grpc.grpclb.SecretGrpclbNameResolverProvider$Provider Unable to get public no-arg constructor
at java.util.ServiceLoader.fail(ServiceLoader.java:581) ~[?:?]
at java.util.ServiceLoader.getConstructor(ServiceLoader.java:672) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1232) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264) ~[?:?]
at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299) ~[?:?]
at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384) ~[?:?]
at io.grpc.ServiceProviders.loadAll(ServiceProviders.java:67) ~[jmeter-grpc-request-1.1.1.jar:?]
at io.grpc.NameResolverRegistry.getDefaultRegistry(NameResolverRegistry.java:101) ~[jmeter-grpc-request-1.1.1.jar:?]
at io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:99) ~[jmeter-grpc-request-1.1.1.jar:?]
at io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:128) ~[jmeter-grpc-request-1.1.1.jar:?]
at io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:123) ~[jmeter-grpc-request-1.1.1.jar:?]
at io.grpc.netty.NettyChannelBuilder.forAddress(NettyChannelBuilder.java:109) ~[jmeter-grpc-request-1.1.1.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createChannelBuilder(ChannelFactory.java:39) ~[jmeter-grpc-request-1.1.1.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createChannel(ChannelFactory.j

Regards
Vru

Hitting NPE in vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:70)

Tried using this in jmeter and hitting below error. Any help resolving this.

java.lang.IllegalArgumentException: Could not extract package name from user
at vn.zalopay.benchmark.core.protobuf.ProtoMethodName.parseFullGrpcMethodName(ProtoMethodName.java:31) ~[jmeter-grpc-request-1.1.2.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:38) ~[jmeter-grpc-request-1.1.2.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.(ClientCaller.java:32) ~[jmeter-grpc-request-1.1.2.jar:?]
at vn.zalopay.benchmark.GRPCSampler.init(GRPCSampler.java:62) ~[jmeter-grpc-request-1.1.2.jar:?]
at vn.zalopay.benchmark.GRPCSampler.threadStarted(GRPCSampler.java:105) ~[jmeter-grpc-request-1.1.2.jar:?]
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:762) [ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) [jorphan.jar:5.0 r1840935]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) [jorphan.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:730) [ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:718) [ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:249) [ApacheJMeter_core.jar:5.0 r1840935]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]
2020-12-22 16:03:47,547 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GRPC Request'.
java.lang.NullPointerException: null
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:70) ~[jmeter-grpc-request-1.1.2.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.0 r1840935]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]

Publish to jmeter-plugin so can be directly downloaded from jmeter plugins manager UI

This is up to the authors, but I think it would greatly increase visibility and presence if this was visible within the mainstream jmeter plugin manager download option. Currently there are no GRPC plugins, and most external plugins maintain author/etc but are added through jmeter-plugins.org

some potential steps here, most reference reviewing the group threads for the steps: https://groups.google.com/g/jmeter-plugins/c/be-vMCfPA_g/m/x4dvAq24AAAJ

Recommend updating license information, such as to pom.xml.
example: https://github.com/undera/jmeter-plugins/blob/master/plugins/perfmon/pom.xml

Support setting version of protoc

I am trying to use this plugin, but it is failing to compile the proto.

When I went through and debugged, I noticed we are using an embedded protoc library, that is older than the version that I am on.

I am on 3.15.1, which contains support for optional, where this plugin is only up to 3.11.4.

Simplest thing would be to either set the protoc version with the plugin used here, or allow usage of the system protoc version, so users can control what version they are on.

Add support to .protoset

Please add support for .protoset files

Protoset files contain binary encoded google.protobuf.FileDescriptorSet protos. To create a protoset file, invoke protoc with the *.proto files that define the service:

protoc --proto_path=.
--descriptor_set_out=myservice.protoset
--include_imports
my/custom/server/service.proto

About JMeter grpc uploading files

The interface for uploading files / pictures cannot be adjusted directly. It is easy to request success with Bloom RPC, but the direct request with JMeter grpc fails, and there is no response, or even an error. Please solve it!!

Where to add grpc option?

eg. grpc.ssl_target_name_override

The caller of the secure_channel_create functions may override the target name used for SSL host name checking using this channel argument which is of type GRPC_ARG_STRING. If this argument is not specified, the name used for SSL host name checking will be the target parameter (assuming that the secure channel is an SSL channel). If this parameter is specified and the underlying is not an SSL channel, it will just be ignored.

java空指针帮忙看下,但是服务端没有错

{
"commonParam":{
"behaviourHabitsChecklist":[

    ],
    "behaviourTargetSettingRecord":[

    ],
    "cbtObstructIdentifyRecord":[

    ],
    "cbtPhase":[

    ],
    "cbtSurveyRecord":[

    ],
    "commonObservationRecord":[

    ],
    "compDiseaseRecord":[

    ],
    "courseLearning":[

    ],
    "dietExecution":[

    ],
    "dietPolicyRecord":[

    ],
    "diseaseRiskAssessment":[
        {
            "createTime":"1642403638",
            "delFlag":2,
            "drAssessmentAiVersion":"",
            "drAssessmentDate":"1642403638",
            "drAssessmentItemName":"空腹血糖风险",
            "drAssessmentItemNameEn":"glucose_0min_risk_level",
            "drAssessmentResult":"hypoglycemia warning",
            "drAssessmentSn":"6105119405610420068",
            "drAssessmentType":"糖尿病疾病评估.风险评估类别",
            "id":"8129803834",
            "patientSn":"156709",
            "recordSectionName":"糖尿病入组风险因素评估记录.再评估",
            "recordSn":"9945008507273425721",
            "updateTime":"1642403638",
            "visitSn":"23784496202199194"
        },
        {
            "createTime":"1642403638",
            "delFlag":2,
            "drAssessmentAiVersion":"",
            "drAssessmentDate":"1642403638",
            "drAssessmentItemName":"餐后血糖风险",
            "drAssessmentItemNameEn":"glucose_120min_risk_level",
            "drAssessmentResult":"crisis hyperglycemia",
            "drAssessmentSn":"8003670571035580912",
            "drAssessmentType":"糖尿病疾病评估.风险评估类别",
            "id":"3391461031",
            "patientSn":"156709",
            "recordSectionName":"糖尿病入组风险因素评估记录.再评估",
            "recordSn":"3944463362633587243",
            "updateTime":"1642403638",
            "visitSn":"23784496202199194"
        },
        {
            "createTime":"1642403638",
            "delFlag":2,
            "drAssessmentAiVersion":"",
            "drAssessmentDate":"1642403638",
            "drAssessmentItemName":"服务组类型",
            "drAssessmentItemNameEn":"program_type",
            "drAssessmentResult":"Blood Glucose Management",
            "drAssessmentSn":"5650556108655060759",
            "drAssessmentType":"糖尿病疾病评估.风险评估类别",
            "id":"7594509607",
            "patientSn":"156709",
            "recordSectionName":"糖尿病入组风险因素评估记录.再评估",
            "recordSn":"6630751652697254252",
            "updateTime":"1642403638",
            "visitSn":"23784496202199194"
        }
    ],
    "examIndicatorThresholdSettingRecord":[

    ],
    "examRecord":[

    ],
    "examTargetSettingRecord":[

    ],
    "exercisePolicyRecord":[

    ],
    "indicatorsMonitoringPlan":[

    ],
    "laboratoryTestRecord":[
        {
            "createTime":"1642403638",
            "delFlag":2,
            "id":"9064681051",
            "patientSn":"156709",
            "recordSectionName":"糖尿病健康状况基线.医学检验",
            "recordSn":"7874345870930836579",
            "specimenName":"静脉血",
            "testDate":"1642403638",
            "testItemName":"空腹血糖",
            "testItemNameEn":"glucose_0min",
            "testItemValue":"3.9",
            "testItemValueNorm":"3.9",
            "testItemValueOriginal":"8",
            "testItemValueUnit":"mmol/L",
            "testItemValueUnitOriginal":"mmol/L",
            "testMethod":"",
            "testQualitativeResult":"",
            "testSn":"1409303021957837921",
            "updateTime":"1642403638",
            "visitSn":"23784496202199194"
        },
        {
            "createTime":"1642403638",
            "delFlag":2,
            "id":"7589980316",
            "patientSn":"156709",
            "recordSectionName":"糖尿病健康状况基线.医学检验",
            "recordSn":"7679243421164065193",
            "specimenName":"静脉血",
            "testDate":"1642403638",
            "testItemName":"葡萄糖-2小时",
            "testItemNameEn":"glucose_120min",
            "testItemValue":"18.53",
            "testItemValueNorm":"18.53",
            "testItemValueOriginal":"6",
            "testItemValueUnit":"mmol/L",
            "testItemValueUnitOriginal":"mmol/L",
            "testMethod":"",
            "testQualitativeResult":"",
            "testSn":"7245498486994314814",
            "updateTime":"1642403638",
            "visitSn":"23784496202199194"
        }
    ],
    "lifeStyleAssessment":[

    ],
    "lifeStyleSurveyRecord":[

    ],
    "mainRecord":[

    ],
    "medicinalOrderRecord":[

    ],
    "metabolicAssessmentRecord":[

    ],
    "patient":[
        {
            "addressCity":"",
            "birthDate":"1957-07-30",
            "createTime":"1642403638",
            "delFlag":2,
            "emailAddress":"",
            "ethnicity":"",
            "gender":"",
            "genderIdentifyWith":"",
            "id":"8214352105",
            "patientName":"陈敏",
            "patientSn":"156709",
            "updateTime":"1642403638"
        }
    ],
    "referenceAttachment":[

    ],
    "testIndicatorThresholdSettingRecord":[

    ],
    "testTargetSettingRecord":[

    ],
    "trainExecution":[

    ],
    "treatmentCycle":[

    ],
    "visit":[
        {
            "admissionDate":"0",
            "age":64,
            "attendingDoctor":"",
            "attendingDoctorId":"",
            "attendingHc":"",
            "attendingHcId":"",
            "createTime":"1642403638",
            "delFlag":2,
            "dischargeDate":"0",
            "gender":"",
            "id":"5209045053",
            "patientName":"陈敏",
            "patientSn":"156709",
            "state":"",
            "updateTime":"1642403638",
            "visitService":"Blood Glucose Management",
            "visitSn":"23784496202199194"
        }
    ],
    "weeklyMedicalNote":[

    ],
    "ydtCbtSurveyIndex":[

    ],
    "ydtDietPolicyIndex":[

    ],
    "ydtDiseaseIndex":[

    ],
    "ydtDocIndex":[

    ],
    "ydtDrAssessmentIndex":[

    ],
    "ydtDrugIndex":[

    ],
    "ydtExamIndex":[

    ],
    "ydtExercisePolicyIndex":[

    ],
    "ydtGenderIndex":[

    ],
    "ydtKnowledgePointIndex":[

    ],
    "ydtLsAssessmentIndex":[

    ],
    "ydtMedicalUnitConversionIndex":[

    ],
    "ydtMetabolicAssessmentIndex":[

    ],
    "ydtMonitoringIndicatorIndex":[

    ],
    "ydtObservationIndex":[

    ],
    "ydtRecordIndex":[

    ],
    "ydtStageNoteIndex":[

    ],
    "ydtSurveyIndex":[

    ],
    "ydtTestIndex":[

    ]
}

}
image

grpc.health.v1.Health proto built-in?

Hi all,
Trying this out, was excited for a way to test GRPC without pre-compiling proto into code binaries (particularly if testing grpc in a language other than jmeter's java).

Testing this, which may be a good one to include by-default (maybe a tab or radio button or pulldown): https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto

JSON empty caused issues (seen in the log), so added '{}' for now, but still not able to run (but no errors in log now)
port 443, checked SSL/TLS
proto root directory pointing to health.proto
library directory empty
full method: grpc.health.v1.Health/Check (from listing button and selecting, awesome!)

I am getting this error in the View Results Tree:

Response code:500
Response message:Exception: UNAVAILABLE: io exception
Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]

Using commandline grpc-health-probe (That has the health.proto built in) to same destination returns successfully (status: SERVING)

Use Variables in Metadata

Hey,

I was trying to set access token dynamically in the metadata but it just sends the variable name as a string.

Regards

Can't find bundle for base name vn.zalopay.benchmark.testbean.GrpcRequestResources, locale en_US

How to over come the below issue

it looks like there is a dependency library missing: BeanInfoSupport: Localized strings not available for bean class vn.zalopay.benchmark.testbean.GrpcRequest
java.util.MissingResourceException: Can't find bundle for base name vn.zalopay.benchmark.testbean.GrpcRequestResources, locale en_US

2020-08-28 21:27:28,648 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'LogMessages'.
java.lang.RuntimeException: Unable to resolve service by invoking protoc
at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:54) ~[jmeter-grpc-request-1.1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.(ClientCaller.java:34) ~[jmeter-grpc-request-1.1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.testbean.GrpcRequest.init(GrpcRequest.java:28) ~[jmeter-grpc-request-1.1.0-SNAPSHOT.jar:?]
at vn.zalopay.benchmark.testbean.GrpcRequest.sample(GrpcRequest.java:34) ~[jmeter-grpc-request-1.1.0-SNAPSHOT.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:551) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) [ApacheJMeter_core.jar:5.2.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
Caused by: vn.zalopay.benchmark.core.protobuf.ProtocInvoker$Pr

Error: Could not find or load main class server.BookStoreServer.

Hi,
I am getting the below exception starting the gRPC server. Can you please help?

-rw-rw-r--@ 1 1668562246 31906745 Apr 4 00:22 gprc-server-1.0-SNAPSHOT.jar
➜ dist java -cp "./gprc-server-1.0-SNAPSHOT.jar" server.BookStoreServer.
Error: Could not find or load main class server.BookStoreServer.
Caused by: java.lang.ClassNotFoundException: server.BookStoreServer.

Regards
Debayan

support of grpc-web

We are tring the jmeter-grpc-request from localhost to the AWS server, which can only accept grpc-web client.
Can you give me some Suggestions please.

2020-09-11 11:12:56,996 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2020-09-11 11:12:56,996 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-09-11 11:12:56,996 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2020-09-11 11:12:57,068 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2020-09-11 11:12:57,068 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2020-09-11 11:12:57,068 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2020-09-11 11:12:57,068 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2020-09-11 11:12:57,068 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2020-09-11 11:12:57,068 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2020-09-11 11:12:57,069 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2020-09-11 11:12:57,345 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GrpcRequest'.
java.lang.RuntimeException: Caught exception while waiting for rpc
	at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:77) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.testbean.GrpcRequest.sample(GrpcRequest.java:42) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: io.grpc.StatusRuntimeException: INTERNAL: http2 exception
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262) ~[jmeter-grpc-client-sampler.jar:?]
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243) ~[jmeter-grpc-client-sampler.jar:?]
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156) ~[jmeter-grpc-client-sampler.jar:?]
	at vn.zalopay.benchmark.core.grpc.DynamicGrpcClient.blockingUnaryCall(DynamicGrpcClient.java:29) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.call(ClientCaller.java:75) ~[jmeter-grpc-request-1.0-SNAPSHOT.jar:?]
	... 6 more
Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 485454502f
	at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:103) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:338) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:239) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:438) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[jmeter-grpc-client-sampler.jar:?]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[jmeter-grpc-client-sampler.jar:?]
	... 1 more
2020-09-11 11:12:57,345 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2020-09-11 11:12:57,345 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2020-09-11 11:12:57,345 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2020-09-11 11:12:57,345 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

run the sample using Basic authentication

i am trying to run the plugin with basic authentication after encoding base64 user:token and getting errors
i am sending metadata as
Authorization: Basic ${TOKEN_AFTER_BASE64}
and i am getting the below
what am i missing?

DATA-----------------------------

<title>401 Authorization Required</title>

401 Authorization Required


openresty/1.15.8.2 ",Thread Group - GetContent 1-1,text,false,,38,0,1,1,null,0,0,0 1616406042986,2,GRPC GetContentVersion Incremental List Request,500,"Exception: UNAUTHENTICATED: HTTP status code 401 invalid content-type: text/html headers: Metadata(:status=401,server=openresty/1.15.8.2,date=Mon, 22 Mar 2021 09:40:42 GMT,content-type=text/html,content-length=185,strict-transport-security=max-age=15724800; includeSubDomains,www-authenticate=Basic realm=""Authentication Required - Test"")

Exporting gRPC results to InfluxDB

Hello,
Thanks for the development of the gRPC plugin, we have been using it successfully for a while.

We would like to export gRPC results to InfluxDB and visualise them in Grafana as we already do for our HTTP uServices with the help of JMeter Backend Listener.

Is it possible somehow to achieve the same for gRPC requests using your plugin?

In Metadata, what if we have comma in value.

Currently, In metadata > key1:value1,key2:value2,
And it is being split by Comma (,)
In one of my requirement i have json string as a value.

key1:value1,key2:{"k":"val","k1":{"val":"val2"}}
so, basically key2 is a JsonString, which have comma inside string,
It is giving Error.

Is it possible to support JSON String as Metadata as we do in BloomRPC?

JSON response: camelCase vs field_name

Which is it supposed to be:

myField

my_field

?

I just re-installed my jMeter and gRPC plug-in and it seems to have changed.

Running jMeter 5.4.3
/usr/local/Cellar/jmeter/5.4.3/libexec/lib/ext with plugin:

21490900 Jan 28 10:59 jmeter-grpc-request-v1.2.1.jar

Enhancement request: Add grpc reflection support

jmeter-grpc-request is a very nice tool, and here's an enhancement request. For services that support grpc reflection, it would be a big logistics issue to copy around proto files from many microservices to the load testing server. Although it isn't uncommon for tools to require the protos there are some tools that take advantage of grpc reflection (like grpc-client-cli command-line tool). It would be really scalable to support grpc reflection, and granted not every service enables reflection but some organizations can and do enforce that requirement.

The idea would be there would be a check-box "Use grpc reflection" and the proto field would grey out.

this.clientCaller is null

I am trying to do a basic GRPC call to a local grpc service but I keep getting the following error:

2020-10-01 09:29:44,043 ERROR o.a.j.t.JMeterThread: Error calling threadStarted java.lang.RuntimeException: Unable to resolve service by invoking protoc at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:54) ~[jmeter-grpc-request-1.1.0.jar:?] at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:32) ~[jmeter-grpc-request-1.1.0.jar:?] at vn.zalopay.benchmark.GRPCSampler.init(GRPCSampler.java:61) ~[jmeter-grpc-request-1.1.0.jar:?] at vn.zalopay.benchmark.GRPCSampler.threadStarted(GRPCSampler.java:104) ~[jmeter-grpc-request-1.1.0.jar:?] at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:769) [ApacheJMeter_core.jar:5.3] at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) [jorphan.jar:5.3] at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) [jorphan.jar:5.3] at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:737) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:725) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:252) [ApacheJMeter_core.jar:5.3] at java.lang.Thread.run(Thread.java:832) [?:?] Caused by: vn.zalopay.benchmark.core.protobuf.ProtocInvoker$ProtocInvocationException: Got exit code [1] from protoc with args [[/Users/bstenfors/dev/go/src/github.mitekcloud.local/engineering/cfd-platform/frauddetection/proto/frauddetection.proto, -I/Users/bstenfors/Downloads, -I/var/folders/rb/sh4ndhd56n7c71zj_0y4s2dcs0021h/T/polyglot-well-known-types4922993313676731235, -I/Users/bstenfors/dev/go/src/github.mitekcloud.local/engineering/cfd-platform/frauddetection/proto, --descriptor_set_out=/var/folders/rb/sh4ndhd56n7c71zj_0y4s2dcs0021h/T/descriptor12160106733389582436.pb.bin, --include_imports]] at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invokeBinary(ProtocInvoker.java:159) ~[jmeter-grpc-request-1.1.0.jar:?] at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invoke(ProtocInvoker.java:104) ~[jmeter-grpc-request-1.1.0.jar:?] at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:52) ~[jmeter-grpc-request-1.1.0.jar:?] ... 10 more 2020-10-01 09:29:44,043 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'GRPC Request'. java.lang.NullPointerException: Cannot invoke "vn.zalopay.benchmark.core.ClientCaller.buildRequest(String)" because "this.clientCaller" is null at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:69) ~[jmeter-grpc-request-1.1.0.jar:?] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3] at java.lang.Thread.run(Thread.java:832) [?:?]

ERROR o.a.j.s.SampleResult: setEndTime must be called after setStartTime

Using version 1.2.0 I'm getting the following error:
2022-01-03 15:01:50,747 ERROR o.a.j.s.SampleResult: setEndTime must be called after setStartTime
java.lang.Throwable: Invalid call sequence
at org.apache.jmeter.samplers.SampleResult.setEndTime(SampleResult.java:1107) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.samplers.SampleResult.sampleEnd(SampleResult.java:1145) [ApacheJMeter_core.jar:5.4.2]
at vn.zalopay.benchmark.GRPCSampler.errorResult(GRPCSampler.java:113) [jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:80) [jmeter-grpc-request.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.4.2]
at java.lang.Thread.run(Thread.java:829) [?:?]

When I added a log.error(...) in the GRPCSampler.sample(...):79 I can see this is the root cause:
java.lang.UnsupportedOperationException: JDK provider does not support NPN_AND_ALPN protocol
at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:432) ~[jmeter-grpc-request.jar:?]
at io.netty.handler.ssl.JdkSslClientContext.(JdkSslClientContext.java:275) ~[jmeter-grpc-request.jar:?]
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:821) ~[jmeter-grpc-request.jar:?]
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:576) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createSslContext(ChannelFactory.java:61) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createSSLMessageChannel(ChannelFactory.java:46) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createChannelBuilder(ChannelFactory.java:40) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.grpc.ChannelFactory.createChannel(ChannelFactory.java:30) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.createDynamicClient(ClientCaller.java:122) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:73) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.core.ClientCaller.(ClientCaller.java:46) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.GRPCSampler.initGrpcClient(GRPCSampler.java:56) ~[jmeter-grpc-request.jar:?]
at vn.zalopay.benchmark.GRPCSampler.sample(GRPCSampler.java:65) [jmeter-grpc-request.jar:?]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.4.2]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.4.2]
at java.lang.Thread.run(Thread.java:829) [?:?]

Same test plan was working correctly with the code in PR #84 that I tested.

I have 'SSL/TLS' checkbox on.

Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long

Proto Root Directory is required. If you fill in a long directory in windows, the following error will be caused:

Caused by: vn.zalopay.benchmark.core.protobuf.ProtocInvoker$ProtocInvocationException: Unable to execute protoc binary
	at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invokeBinary(ProtocInvoker.java:154)
	at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invoke(ProtocInvoker.java:112)
	at vn.zalopay.benchmark.core.ClientList.getServiceResolver(ClientList.java:44)
	... 29 more
Caused by: java.io.IOException: Cannot run program "C:\Users\Administrator\protocjar9373537479562135241\bin\protoc.exe": CreateProcess error=206, 文件名或扩展名太长。
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at com.github.os72.protocjar.Protoc.runProtoc(Protoc.java:117)
	at com.github.os72.protocjar.Protoc.runProtoc(Protoc.java:78)
	at com.github.os72.protocjar.Protoc.runProtoc(Protoc.java:55)
	at vn.zalopay.benchmark.core.protobuf.ProtocInvoker.invokeBinary(ProtocInvoker.java:151)
	... 31 more
Caused by: java.io.IOException: CreateProcess error=206, 文件名或扩展名太长。
	at java.base/java.lang.ProcessImpl.create(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:487)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:154)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 36 more

I am trying to solve this problem.

protocolbuffers/protobuf#274
xolstice/protobuf-maven-plugin#5

This is a problem with a long history of windows. If we want to solve it, we may need to replace the protoc-jar-maven-plugin dependency in maven pom.xml.

I am trying a solution that does not replace.

Cannot send requests via secure connection

Hi,

I am trying to use this plugin to send a GRPC request via Jmeter. I have imported the trusted keys into my Jmeter key store and can see them loading in the debug output - however whenever I try and run the request I see the following error.

DEBUG i.n.h.s.ReferenceCountedOpenSslEngine: SSL_read failed with 1: OpenSSL error: 268436496 error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE

The same GRPC request works in a standalone application using the same keys used to send single requests. I only seem to have this error while sending requests from this plug in.

Do you have any suggestions on the cause of this issue ? Do I need to import certificates a different way compared to normal Jmeter certificate locations ?

enabling ssl/tls in grpc request throwing error while running testplan

I have given cacert in system.properties javax.net.ssl.trustStore=cacert.p12
I see below error.
Response code:500
Response message:Exception: io.grpc.StatusRuntimeException: UNKNOWN: Channel Pipeline: [WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0].

"Exception: Could not extract package name" for proto without package

Got Exception: Could not extract package name while running this plugin for proto without package

package should be optional for proto file (reference)

Error line: https://github.com/zalopay-oss/jmeter-grpc-request/blob/master/src/main/java/vn/zalopay/benchmark/core/protobuf/ProtoMethodName.java#L28

2021-02-18 16:17:10,180 ERROR o.a.j.t.JMeterThread: Error calling threadStarted
java.lang.IllegalArgumentException: Could not extract package name from <redacted>
	at vn.zalopay.benchmark.core.protobuf.ProtoMethodName.parseFullGrpcMethodName(ProtoMethodName.java:31) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.init(ClientCaller.java:38) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.core.ClientCaller.<init>(ClientCaller.java:32) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.GRPCSampler.init(GRPCSampler.java:62) ~[jmeter-grpc-request-1.1.2.jar:?]
	at vn.zalopay.benchmark.GRPCSampler.threadStarted(GRPCSampler.java:105) ~[jmeter-grpc-request-1.1.2.jar:?]
	at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:784) [ApacheJMeter_core.jar:5.4.1]
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) [jorphan.jar:5.4.1]
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) [jorphan.jar:5.4.1]
	at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:752) [ApacheJMeter_core.jar:5.4.1]
	at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:740) [ApacheJMeter_core.jar:5.4.1]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:252) [ApacheJMeter_core.jar:5.4.1]
	at java.lang.Thread.run(Thread.java:832) [?:?]

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.