What does mean connection in jmeter ? Can we get the details of how many connections were made (not the user sample but the connections) - performance

What does mean connection in jmeter ? Can we get the details of how many connections were made (not the user sample but the connections)

You can monitor the number of the TCP connections open by JMeter by invoking netstat command in the OS Process Sampler
If you're testing a web application the number of connections will vary from 1 to 6 (or whatever you specify under HTTP Request Defaults)
However normally you should not be very interested in this form of information. My expectation is that you should rather be looking for Server Hits Per Second custom chart which reports how many "hits" were generated by JMeter during the test execution time frame. The listener is available via 5 Additional Graphs bundle and can be installed using JMeter Plugins Manager

Related

Multiple Parallel Websocket connections to SignalR hub in JMeter

We are trying to load test our login workflow, by simulating 50+ users logging into our front-end, via the API calls. As part of the login process, we make a websocket connection to a SignalR hub(Connect). We then send a call over the websocket connection to a custom endpoint in SignalR(Login), used to add some data to the Redis cache, then do some stuff which isn't important, then send a call to a different custom endpoint over the websocket connection(Logoff) and then Disconnect the websocket connection.
So my question is multi-part:
How do we create a websocket connection from within JMeter?
How do we make a call to a custom endpoint over the websocket connection in JMeter
How do we do this for multi users simulated to be running in parallel, so we can test the load? In other words, we need multiple websocket connections open / alive from JMeter so we can test the load.
Note: Please be aware, I'm asking this on behalf of the load tester/JMeter developer, but because they are new to Stack Overflow, and I understand the SignalR side, I've been asked to log it. I know zip about JMeter, so please handle me like a noob trying to help someone solve a frustrating but important problem.
JMeter per se doesn't support WebSockets, you will need a special plugin if you want to enable this functionality.
The most advanced, comprehensive and supported as of now is JMeter WebSocket Samplers by Peter Doornbosch, it can be installed using JMeter Plugins Manager
Once you install the plugin and restart JMeter you will see several new samplers which will allow to open connection, send request, read response, and close connection.
Unfortunately I cannot guide you further because I don't know the specifics of your application, just look into your browser developer tools or other sniffer tool and configure JMeter to send the same requests as your browser (or other application) does.
More information:
Test SignalR Performance with JMeter
JMeter WebSocket Samplers - A Practical Guide
samples directory contains several example test plans covering different scenarios

The jmeter concurrency test found 429/Too Many Requests errors

I set up a web project with springboot and modified the Tomcat configuration:
tomcat:
max-threads: 800
accept-count: 1000
max-connections: 10000
min-spare-threads: 100
I deployed the project to a Linux server. The concurrency performance was tested with jmeter both locally and on the server. jmeter sets the following parameters:Number of Threads is 200, Ramp-up period is 0, and Loop Count is 1.
The local result is normal, and all requests are all accepted. However, 429 errors occurred in 43.5% of requests from the server test result.
How to solve this problem?
It might be the case you have a rate-limiter implemented somewhere so depending on the configuration applied you can:
Just turn it off via Spring Boot configuration
Or check your app performance within the configured maximum requests rate
Or try to impersonate different users coming from different IP addresses by setting up IP Spoofing in your JMeter test so your server would "think" that users are coming from the different locations and apply rate limiting for each user and not globally.

JMeter - I need to open and keep multiple websocket connections at the same time to be able to use them in parallel in JMeter

I am using JMeter to test our websockets server API and now I have the following issue. I need to open and keep multiple WS at the same time to be able to use them in parallel.
JMeter WebSocket Samplers plugin provides possibility:
To open a WebSocket connection via WebSocket Open Connection sampler
And then you can re-use the connection in the following Samplers which will be doing the real work: read, write
When you don't need the connection anymore you can use WebSocket Close sampler
The connections are established "per thread" (virtual user) so provide necessary amount of concurrent threads in the Thread Group and make sure to specify enough loops or the desired duration of the test
More information: JMeter WebSocket Samplers - A Practical Guide

I cannot do load test using jmeter in XMPP server, I had added all plugins and given xmpp connection, samplers for connecting login, and all

I cannot load test the chat application in XMPP server using jmeter, I found all XMPP samplers from connect, login till disconnect as error. Please help!
I get this error in the connect server sampler itself and thereby all samplers are error
Nobody will be able to help without seeing the error details so going forward make sure to include essential information about your test, i.e.
Screenshots of your XMPP Samplers
Output of the View Results Tree listener in screenshot or textual form
Relevant entries from jmeter.log file
In the meantime check out XMPP Load Testing - The Ultimate Guide - it contains comprehensive information on how to configure XMPP Test Elements and simulate different types of events (connect/disconnect, log in, get contacts list, setting status, etc.) as well as example test plans

How do I make jmeter use the same hostname/port for all HTTP requests in a thread, but different values for each thread?

I am testing a clustered application, and want to define a different thread to test each machine in the cluster. I have a thread group with two HTTP Requests, a login that is done once, and a POST that is repeated many times. I set up a CSV Data Set Config to configure the Server Name and Port Number for the HTTP Requests. A HTTP Cookie Manager holds the login cookie resulting from the login request.
The problem is that for each time a HTTP Request runs the CSV file is read again. Often the same thread reads hostname and port values, and the login cookie is then not sent because it only applies to the original machine the thread logged into.
Is there any way to get make the CSV Data Set Config only read once per thread? Or perhaps some other way to set the hostname/port on a per thread basis instead of a per request basis like I am doing now?
I believe default settings of the CSV Data Set Config provide what you're looking for:
Other option is to distribute the threads using If Controller like:
If Controller, condition: (${__threadNum} % 2 == 0)
HTTP Request for even threads
If Controller, condition: (${__threadNum} % 2 != 0)
HTTP Request for odd threads
Both options use __threadNum() function which basically returns the number of current thread, maybe you'll be able to test your approach or come up with a better one knowing this.
In general testing clustered applications by hitting different hosts separately isn't the best idea. End user usually accesses such applications via software of hardware Load Balancer so he sees single hostname or IP address. The load balancer distributes the requests between servers using various algorithms.
I think this is the situation you need to simulate and it is better to add DNS Cache Manager to your test plan so each thread could resolve hostname on its own.
You can use HTTP request Defaults.
Update your Server IP, Port and protocol details. All the HTTP requests in Thread Group will take the default ip, port etc from the HTTP request Defaults.
Check here for more details

Resources