I have Four Sampler APIs : 3 GET APIs and One Put API and want to do spike test using UltimateThread Group. So i created an ultimate thread Group and added the four APIS under them.I have given split 25 user within different hold time and ramp-up time as per below image. But whenever i am running it is only running the first two API sampler and the last two apis are not running at all.
another issue is that among the two running APIs, only one API is running with 25 threads and other one with only 5 threads ....but its should run 25 threads for each APIs .Kindly let me know whats the issue and as i am new to Jmeter ..trying to resolve the issue but unable to do troubleshoot it.
APIs Sampler
Ultimate thread Group Set-up : AGGregate Report : TREE REPORT
AS YOU CAN SEE THERE FOUR APIS BUT IT HAS EXECUTED ONLY TWO APIS, AMONG THE TWO OF THEM,
ONE HAS 25 THREADS
ONE HAS 5 THREADS
BUT as per my understanding it should run all four APIs with 25 threads for each API sampler...
Each user in the Ultimate Thread Group runs for 10 seconds maximum
Average Response Times for first 2 Samplers are 12 and 32 seconds correspondingly
The threads shut down times and reasons can be seen in jmeter.log file
Assuming above 2 factors the threads are simply being shut down before starting 3rd and further Samplers.
You need to either:
Set "Hold load for" to a bigger value, i.e. a couple of minutes
Or introduce reasonable response timeouts under "Advanced" tab of the HTTP Request Defaults so if the response time exceeds acceptable
Related
Intro:
Using JMeter 5.4.1, I have generated the HTML dashboard report for a test with 2 Concurrency thread groups, both having the tstFeedback function configured as such ${__tstFeedback(ThroughputShapingTimerOut,1,1000,10)} along with a Throughput Shaping timer which increases the target load by 21 RPS every one minute. The Threads have some sort of synchronization using an InterThreadCommunication plugin because I need to pass information from one thread to the other.
Issue description:
One Thread group does not need all the 1000 Threads to generate the specified load because it is faster at a given time so only 22 Threads are active at that point in time, however, the Active Threads Over Time chart displays the line at the same level as the Thread which had 1000 active threads at that time. My expectation was that it should be lower (visually is should be much further apart from the other thread group line). Upon hovering over result, it seems to display the correct number of threads, but the scale on the left side is around the 1000 count.
Here are some screenshots about what I mean:
This seems to me as an issue with the graphical representation of the active threads over time chart. Can someone confirm that my assumption is correct?
No, it's just a chart which visualizes the number of active threads (grpThreads column of the .jtl results file)
You can generate the same chart using MS Excel or equivalent
and/or use Active Threads Over Time listener (can be installed as a part of 3 Basic Graphs bundle using JMeter Plugins Manager)
If you're using inter-thread communication plugin and some threads are "waiting" for the data and not doing anything - they will still be displayed as "active" because in JMeter world "active" means a thread that has been "started", but "active" doesn't necessarily mean that the thread is doing anything as it may "sleep" due to a Timer
I have a requirement to create simple Burst test in Jmeter:
10 requests-> 20 requests -> 30 requests
On single worker mode.
Throughput 20ms
Anticipated response time : <=200ms
How can we achieve this with Jmeter without using parallel threads?
I am looking for a simple solution.
Thanks a lot
Add plugin
Ultimate Thread Group to JMeter
Add Ultimate Thread Group component with settings of 3 rows
Set Start Threads Count 10,20 and 30
Use different start times so requests batch will be executed in different times
"Ultimate" means there will be no need in further Thread Group plugins. The features that everyone needed in JMeter and they finally available:
infinite number of schedule record
separate ramp-up time, shutdown time, flight time for each schedule record
and, of course, trustworthy load preview graph
Consider using Throughput Shaping Timer and Concurrency Thread Group combination which provides flexible way of defining load patterns:
They can be connected together using Feedback Function so JMeter will be able to kick off more threads in order to reach the desired throughput (number of requests per second) if current amount is not enough.
Both can be installed using JMeter Plugins Manager:
i have the need to run one http request sample more times than the rest of the samples in the Test group, for example, i need to run for 10 users, but for each of them, i need to run one of the samples multiple times, lets say 10, is there a way to achieve it?
1) I set "Number of Threads (Users)" in Thread group to 10, so i have 10 total users (with data taken for every thread from a CVS file, with equal number of rows and threads, so 1 thread is an unique data set.
2) I make some requests after, but for only one of the requests, i need to make it like 100 times in parallel for the same data for every thread, so in total, i will make 1000 (100 http requests for 10 unique users/threads) requests to that endpoint
Thanks in advance!
Edit: I found the loop controller, but its not making the 100 http requests at the same time for each thread in the thread group, it makes another one when the first ends
If I correctly got your requirements, to wit:
You need to execute one sampler more times than other samplers
The execution must occur at exactly the same moment
The most obvious choice would be either Parallel Sampler or Parallel Controller (depending on the nature of your requests). You can install both test elements using JMeter Plugins Manager:
I have concerns about the duration of executing JMeter Test Scenario.
In fact, if we execute a manual test with 1 user in 1 hour, we will find the same duration or little more with 3 user.
But, with JMeter test the duration with 1 user will be multiplied by the number of users.
During my scripting with this tool, I've noticed that JMeter always wait for the response of the request to pass to another request. It's like we have 1 user doing the work of multiple users.
Does any body have explanations about this issue?
Can we configure JMeter to perform like we have x users working in // ?
Depends how you are simulating users..
Each thread will wait for a response, but users are represented by different threads, and threads do not wait for each other to complete samples, they are independent.
If you are using threads in thread group to represent users (which is the intended usage), the threads will start concurrently and run independently, so you should see the 3 users complete in an hour, as with manual tests. If this is not happening, then you should check the resources used on the client running jmeter during single thread and multi thread runs. Or perhaps the bottleneck may be in the transport (ie bandwidth). All you have determined so far is that the bottleneck is prior to the server, you need to determine where it is.
It is also possible you have created a thread group for each simulated user. If this is the case you can set the groups to run consecutive or concurrent. The setting for this is on the Test Plan element at the very top of the tree. You want concurrent, so untick 'Run Thread Groups Consecutively'.
So it comes down to how you are simulating users.
In ideal world if you test your site with 1 user all set of actions completes in 1 hour. If you add another 100 users - still one hour, 1000 users - 1 hour.
In real world server response time increases with the number of concurrent threads. But it isn't something like
1 user - average response time 10ms
2 users - 20 ms
3 users - 30 ms
But
1 user - 10 ms
2 users - 10 ms
3 users - 10 ms
10 users - 11 ms
The whole idea of the performance testing is to determine the upper limit of server load and identify bottlenecks and issues which happen under the load so you could state something like: using this hardware and this configuration the application is capable of serving 500 concurrent users without serious delays. In case of 1000 users response time will be more than 15 seconds.
In regards to threads, JMeter thread starts, executes samples one by one for defined amount of loops and exits. It is applicable for each thread which are independent. Basic throughput control can be done via ramp-up and loops count (see Thread Group documentation on details)
More advanced load scenario definition can be done using following Test Elements:
Ultimate Thread Group - which provides easy visual way of defining ramp-up, ramp-down and time to hold the load
Constant Throughput Timer - to set desired load rate in requests per minute
Synchronizing Timer - to pause all the test threads and release them at the same moment to produce a "spike"
I have made some PHP scripts and I want to test the response time for simultaneous users in JMeter. This scripts are run in a very short time (50 miliseconds).
What I would like to do is to simulate a load test from 1 to 50 of users where each user (thread) repeats the request for an unlimited period. So first we will have 1 user, after 2 simultaneous users, after 3 ... and so on.
I am trying to do it but with I have is response times where it is evident that there is no simultaneous request.
With HP loaddrunner we can define number of iterations for each thread, is this possible in JMeter?
You can possibly use these 2 thread group implementations
Stepping Thread Group
Ultimate Thread Group
from Jmeter Plugins package, that let you set load-increase for you scenario as you want.
As well you can also look onto Synchronizing Timer if you want "better" concurrency - but this is rather stress-testcase than load one.