How to listen to a port in cloverleaf using JMeter to receive messages and get them as response into JMeter Listeners?

27 Views Asked by At

I have tried using Java Requests, TCP Samplers, JSR223 but nothing seems to work, a connection is established but no message is shown in the Listeners.

1

There are 1 best solutions below

0
Dmitri T On

If you use Java Request or JSR223 Sampler it's you who needs to get the response, convert it into a byte array or a string and set it as a SampleResult.

See JavaDoc for all available functions (you're interested in setResponseData() mainly) and Top 8 JMeter Java Classes You Should Be Using with Groovy article for more information on this and other most commonly used JMeter API classes