JMeter - bzm Parallel Controller - jmeter

Can someone please explain the "Limit max thread number" property for the bzm parallel controller plugin? When monitoring requests from the browser we can see there are some requests that happen in parallel. Is this property to be set to the number of requests observed occurring in parallel?
What would be the issue of not setting a limit, if the scenario is run as part of an Azure pipeline? Would it automatically determine the max number of requests that are to be executed in parallel?
Thank you.

Parallel Controller executes all it's children in parallel.
The limit is introduced to support browser-like behaviour, the majority of modern browsers open up to 6 connections to a server in order to download embedded resources and execute AJAX calls.
So if you want your JMeter test to behave more like a real browser and you're using Parallel Controller to mimic calls to embedded resources or AJAX requests you should set the limit to match the browser you're trying to simulate

Related

How to find deadlock, timeout and memory issues using JMeter?

I am new to performance testing. I have a task on measuring the web application performance. I need to find out which modules/calls are causing deadlock, timeout and memory issues.
Q1. How can I use JMeter to find out deadlock, memory and timeout issues? If I do the following steps, it is the right way to trace those issues?
create a test plan in JMeter, which contains multiple Thread Group.
In each thread group, it contains multiple HTTP requests and 200 or
more users plus infinite loop.
Monitor JMeter results and SQL
profiler for deadlock.
Q2. JMeter is the right tool for tracking those issues? Or, should I use browser based performance testing tool such as LoadNinja, LoadView?
Thanks
Bonnie
Q1 JMeter per se doesn't provide any toolchain to detect deadlock and memory issues, the HTTP Request sampler (or even better HTTP Request Defaults) provides possibility to set the timeouts, if the value is blank - it will default to operating system timeout or web server timeout, whatever comes the first
If you conduct some form of stress test, i.e. start with 1 virtual user and gradually increase the load at some point you will see that response time starts growing and number of requests per second starts decreasing. So it's the point of maximum system performance and after that the performance will be degrading.
To monitor application under test memory you can use JMeter PerfMon Plugin, it will allow you to state whether the lack of RAM is the cause of the performance issue
With regards to deadlocks, it should result in HTTP Request sampler failure (or timeout), JMeter won't give you the underlying reason, but it will give you the timestamp and you should be able to check what happened with your application/database at that moment.
Q2 well-behaved JMeter test must produce the same network footprint as a real browser, if your test plan is good enough the system under test shouldn't be able to distinguish whether it's being hit by JMeter or by a real user using the real browser. JMeter will not give you client-side performance metrics like page rendering time or JavaScript execution time as:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).

We are using JMeter to test a Salesforce application.The login takes 35 secs from JMeter for single user,however from UI it takes maybe 15secs

Showing this value to the client would raise questions. How to clarify the response time.
There are multiple requests in one transaction, the UI runs these requests in parallel and JMeter runs these sequentially and adds the response times of all sub-request .Could that be the reason for high response times only from JMeter.? IF so then JMeter has an issue and not reliable !?
Please help on this issue.
Thanks in advance.
If "UI runs these requests in parallel" then JMeter must run these requests in parallel as well.
If the requests are related to so called "embedded resources" - images, scripts, styles, fonts, sounds, etc. - just tick the appropriate box in the HTTP Request Defaults and remove the individual calls to images, scripts, etc from your test plan
If the "requests" you're talking about are i.e. AJAX calls you can "tell" JMeter to run them in parallel by placing them under the Parallel Controller (it's a plugin installable via JMeter Plugins Manager)

Jmeter5.2.1 : Test Runs are taking more time in Jmeter

I am working on migration of scripts from performance center to Jmeter5.2.1.
As part of this migration , we are using same functional flow which we did in performance center.
My scenario consists of users logging in to the web application perform 10-15 iterations and then logout.
This is my Testplan.
TestPlan
--ThreadGroup1
--Once Only Controller (login of users)
--Loop Controller (10 Iterations)
HTTP1
HTTP2
HTTP3
.
.
--Once only Controller (logout of users)
--csv Config data ( username/password)
--csv config data( unique data for the loop controller)
With this approach I am noticing that the time taken to complete the test in Jmeter is much more than what we have in performance center ( I took care of think times and added the similar values)
Why is my test run slow in Jmeter?
Is loop controller sequential? Meaning at a given time it can run only one request?
If not loop controller what other options we have to satisfy my scenario.
If I include different thread groups , carrying JSESSIONIDs needs to be done across thread groups which is not a best practice to do so.
Update:
Comparison between performance center and Jmeter settings
Below are the settings in Jmeter.
Thread Group settings:
TestPlan :
HTTP Cookie manager in Thread Group
CSV data files in Test plan
Once Only counters for Login and Logout
Loop Controller for Iterations.
HTTP request Defaults: ( Even with out checking retrieve all embedded and parallel downloads its taking more than an hour for 3 users)
TestPlan
Performance Center results :
Every Sampler has HTTP Header manager
Entire Test Plan
Given you send the same requests you should have the same response times, no matter which tool is being used under the hood.
It's hard to say what the differences are without seeing the full scripts from the both tools so generic advice is to use a third-party sniffer tool like Wireshark or Fiddler in order to identify the differences and configure JMeter to behave exactly like the "performance center" (whatever it is)
For example I fail to see HTTP Cache Manager and it will cause JMeter to download embedded resources (images, scripts, styles, sounds, fonts) for each and every HTTP request while real browser does it only once.
I also don't see HTTP Header Manager which might be very important, for example if you send Accept header the server will be aware that the client can understand gzipped responses which will greatly reduce network traffic.
More information: How to make JMeter behave more like a real browser

JMeter: How to run two thread parallel after completion of first thread

My application is live application & three is a heavy use of AAJX call and Java scripts.
Successful login required three steps
Login validation
On login page browser post user login information and backed first validate it and set cookies & session id for further use.
After successfully validation of user information browser initiate two request parallel towards back-end.
Browser post a request to server & server send some XML data in every 10 seconds towards browser. Back-end push information in every 10 seconds up to user logged in.
Also browser post a ping request to server to make sure user is available and active.
To test the performance of UI by JMeter I am planning to create following test plan.
Test Plan
Main Login Thread
Ping Thread
Application Thread
Now I want to run thread 2 & 3 parallel after completion of first thread.
Please let me know if this is possible in JMeter if Yes how I can run two threads parallel after completion of first.
It isn't something which is provided in JMeter out-of-the-box as currently there is no way to jump over the number of threads which are defined on Thread Group level so you'll need to do some coding in order to work it around, i.e.:
Use JSR223 Sampler (or PostProcessor)
Develop custom sampler i.e. basing on ExampleSampler which spawns more threads in order to simulate AJAX parallel calls
See How to Load Test AJAX/XHR Enabled Sites With JMeter article for more details and some reference implementation examples.

Jmeter - How to do parallel request

I have a web Service request that push a notification in a screen,I want to measure the time taken to display the notification in the screen after the request of the web service requested,so I want to send both requests in parallel. How can i do that ?
[![I want the two highlighted steps to be done concurrently ][1]][1]
The two highlighted steps not occurred concurrently.
JMeter provides Synchronizing Timer which allows grouping requests so they could be executed at exactly in the same moment. Just add a Synchronizing Timer to your test plan and make sure that
it is at the same level with both requests
number of virtual users in Thread Group is >= what is set in the Synchronizing Timer
See Using the JMeter Synchronizing Timer for more information on running specific requests at the same time in your JMeter test.
You can use this plugin Parallel Controller that you can install with jmeter-plugins manager
You use Parallel Controller:

Resources