Jmeter: Access all results from all threadGroups from JSR223 Sampler or BeanShell Sampler in TeardownThread - jmeter

is there a way to get info about all requests in the mentioned samplers after main thread group finished? In TeardownThread maybe?
I want to perform some calculation and send couple request which are based on info about those requests and it is to resource consuming to do it with sampler for each of the requests.

No.
The options are in:
Parse the .jtl results file
Use the JSR23 Listener in the main Thread Group. The Listeners obey JMeter Scoping Rules if you don't want your code to run after all samplers
Create a JMeter Plugin, the most suitable option for your case would be your own implementation of Backend Listener

Related

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

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

Concurrent Users Load test for WebSocket is not executing properly in JMeter

I'm doing concurrent users load test for SignalR Protocol with WebSocket transport, I'm able run the script successfully for single users with more than 1 iteration. If I run it for concurrent users I'm not getting the expected behavior- which is I'm getting Second users response in first user request.
Please guide me here.
Most probably your parameterization or correlation fails somewhere somehow, i.e. you're sending the same session argument for both users.
Use Debug Sampler and View Results Tree listener combination in order to inspect request and response details and associated JMeter Variables values.

how to send custom metrics from Jmeter to InfluxDB

We are creating custom metrics in JMeter using beanshell scripting and saving them to a file.Our requirement is to send this metrics to InfluxDB. We tried using Backend Listener with Graphite and InfluxDB implementation client but couldn't send the custom values. Only the default Jmeter metrics are being passed.
Has anyone done this before, can you guide us to resolve this issues.
We are using Jmeter 3.3 and influxdb-1.4.2-1
Thanks,
BB
Two words: line protocol.
Another two words: custom listener (Beanshell/JSR223 with Groovy).
Marry them, and you'll have what you want.
I did that work once, and it didn't take long.
There may be other options (like, take this result file and feed it to script that shapes it to the same line protocol, but post-execution, not live) - but the one I suggest is the simplest.
To do it you can use /write endpoint as it described in influxdb.com
Image below shows how it can be done in Jmeter using "HTTP Request" sampler.
How to send custom data to influxDB:
In a DB it will looks like on image below:

How to get slow response services in bulk email using jmeter?

I want email notification after completion of test i have more than 100 samplers so i need bulk mail which should contain only slow response services/samplers how to achieve this?
I would suggest the following setup:
Amend JMeter configuration to save only failed samples and to store the results as soon as they appear by adding the next lines to user.properties file:
jmeter.save.saveservice.successful=false
jmeter.save.saveservice.autoflush=true
JMeter restart will be required to pick the properties up
Use Duration Assertion with some form of threshold to mark "slow" samplers with response times lower than that threshold as failed
Use tearDown Thread Group and SMTP Sampler to send the results where required.
References:
Configuring JMeter
Load Testing Your Email Server: How to Send and Receive E-mails with JMeter

Jmeter extending a threadgroup to make it more like listener

Is it even possible to extend Thread group in jmeter that it will be both Thread group and listener i mean hat it will get data from samplers and probably save then into a file ?

Resources