Each request ech value response Throughput Shaping Timer - jmeter

So I'm using Concurrency Thread Group with Throughput Shaping Timer.
In TST I have:
one request per second duration 60s
then
two request per second duration 60s
So after all I expect 180 requests but each run I receive different values. Why?
One time 142, another 118.
result
settings

You're having some errors in your tests so it worth checking jmeter.log file for any suspicious entries:
You should not be running your tests in GUI mode, GUI mode is only for tests development and debugging, when it comes to test execution, especially for 1000 virtual users you should be running your JMeter tests in command-line non-GUI mode

Related

What jmeter configuration I should use when running load test of 25 threads

I need to run a load test of 25 threads, what will be the most efficient configuration to use? (ramp-up period....). I ran the load test with the below configuration and some of the threads failed but pass if I just ran the script individually.
Your configuration will mean that:
JMeter start with 1 thread and add another thread each 4 seconds
Once started each thread will begin to execute Samplers upside down (or according to the logic controllers)
When the thread executes the last sampler it will be shut down
When the last thread executes the last sampler the test ends
Depending on the number of samplers and application response time you may or may not achieve 25 users concurrency, you might want to check the actual number of concurrent users using Active Threads Over Time listener
If you want to make sure to have 25 online users set "Loop Count" to Infinite and "Specify Thread Lifetime" duration to be more than your ramp-up period. See JMeter Test Results: Why the Actual Users Number is Lower than Expected article for more details.
With regards to the failures - we cannot state anything meaningful without seeing request and response details, make sure to save them using i.e. View Results Tree listener and inspect response body for the failed requests

Load Testing of UI User scenario - Jmeter Webdriver sampler

I want to run basic load testing scenario on a mendix application.
The initial requirement is at least 10 users should be able to perform some activities like login , file upload concurrently.
I have used the webdriver sampler in Jmeter with selenium and written the JS script for the actions.
The issue is it launches 10 browser on the same machine.
Please suggest the proper way to handle this. Currently it seems that the errors which I am getting are because of I am running the test on my laptop instead of distributed setup.
Also the total script takes 60 seconds to finish for single user. What should be the ramp up time?
If not Jmeter, please suggest any other suitable tool for this scenario.
As per The WebDriver Sampler: Your Top 10 Questions Answered article
Q. How do I Allocate the WebDriver Sampler?
A. First of all, don’t use the WebDriver Sampler to create the load! You’ll need around 1 CPU core per virtual user to keep the JMeter resource consumption within an acceptable range. The WebDriver Sampler should be used in addition to HTTP Request Samplers. Here’s an example of how it should be used:
1,000 of users are simulated by HTTP Request Samplers
1 user is the WebDriver Sampler
You should use the WebDriver Sampler to evaluate a real-life user experience. It’s most commonly used to measure the load times of pages when the system is experiencing high loads. The HTTP Request doesn’t really “render” the page and it can’t execute JavaScript. That’s why the WebDriver Sampler is so valuable - JMeter isn’t a browser and it overcomes limitations posed by this fact.
So first of all I would recommend re-considering your approach and migrating to HTTP Request samplers, you might be able to execute 10 browsers but if you will need to scale your test to 100 or 1000 users you will definitely won't be able to use this "real browser" approach while HTTP Request samplers act on HTTP protocol level, given you properly configure JMeter it will be no difference for the application under test whether the requests are originating from JMeter or from the real browser and the resources footprint will be much less.
With regards to the ramp-up time: the overall idea is to increase the load gradually so you could correlate the changing number of virtual users with changing metrics like response time, throughput, etc. According to JMeter Documentation:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).
Start with Ramp-up = number of threads and adjust up or down as needed.

JMeter number of threads in a run

I am quite new to jmeter and try to do a performance test of my application. I want to generate 100 request per second scenario however my server takes 3-4 secs to respond to every request. I am running my test for 1 mins which means number of requests fired should be 60k within the time span. However jmeter actually waits for the response before it sends next request. Which is not what I am looking for.
How can I make sure that jmeter sends a new requests every second with 100 req/sec without waiting for the response so that the number of requests fired per min is 60k.
I am trying to use constant throughput timer with 60k as request per min, however that is not helping. Here is my test screenshot.
EDIT
I have done like this
And Throughput shaping timer being as
So ideally I should get number of samples as 3000?, still not getting that.
Make sure you provide enough threads (virtual users) under Thread Group, "vanilla" JMeter won't kick off any extra threads if actual throughput is less than target one you specify in the Constant Throughput Timer.
Another solution would be using Concurrency Thread Group along with the Throughput Shaping Timer. They can be tied together via feedback loop so if you use these test elements JMeter will start more threads if the current amount won't be enough to reach the desired requests per second rate.
You can install both using JMeter Plugins Manager
My suggestion is to consider using the Arrivals Thread Group. This TG will allow you to configure the desire average throughput (ATP); the TG will instantiate the required threads needed to achieve the ATP goal.

JMeter test action not pausing

I have a JMeter test executing a series of actions that I'd like to pause between.
It's currently set up like this:
Thread Group
+---Transaction controller
+---Sampler executing request
+---Test Action
+---Uniform Random Timer
+---Sampler executing request
+---Test Action
+---Uniform Random Timer
(etc.)
The test actions don't seem to cause any pauses. I have the test actions themselves set to pause the current thread for 0 milliseconds, and the timers to 60 seconds constant pause + up to 30 seconds random pause.
The actual result of running this is that it hops directly from sampler to sampler without pausing at all. What am I missing?
(ETA: This is JMeter 2.13, if that matters.)
Can you confirm that you use time in milliseconds in the Uniform Random Timers, to wit:
Random Delay Maximum: 30000
Constant Delay Offset: 60000
As if you have 30 and 60 correspondingly - the delay happens, but you are not detect it visually. Check "Sampler Start" times in View Results Tree listener to see start times.
Can you double check Transaction Controller configuration? By default timers, pre and post-processors execution time is not being included into report so the delay might happen but you just don't see it. You can include timers duration by checking "Include duration of timer and pre-post processors in generated sample" box
And finally you can also remove Test Action samplers as they're not required. If you put timers as children of "Sampler execute request" the timers will be executed before the requests. See A Comprehensive Guide to Using JMeter Timers guide for more detailed information on timers use cases.

Perform load testing, stress testing, capacity testing with JMeter

Hi I am new to JMeter and I do know how to perform load tests using JMeter. I tried to figure out how a stress test or a capacity test is performed via JMeter. Is it by gradually increasing threads in JMeter we can determine when performance hits are arise and get that threshold and run tests above the threshold. Does it make a stress test then?
Confused in how to perform a stress test and a capacity test with Jmeter tool.
JMeter is very flexible and load scenario can be established in multiple ways. Out of box there are following test elements available:
Thread Group - where you can set
Virtual Users Number
Ramp Up Time
Iterations count
JMeter acts as follows: each samplers are being executed upside down with each thread representing virtual user. When thread has no more samplers to execute and no more iterations it is being shut down. For ramp-up bit: by default settings JMeter tries to kick off all the threads as fast as it can but you can configure it to simulate increasing load. I.e. if you have 30 users and 30 seconds ramp-up time JMeter will start with 1 user and add one per second.
Constant Throughput Timer
Constant Throughput Timer can be used to set exact load in "Requests per minute".
Synchronizing Timer
Synchronizing Timer pauses test threads until threshold specified is reached. Once there are enough threads in pool JMeter releases them all at the same moment providing "spike" simultaneous load.
You can also use i.e. Ultimate Thread Group available via JMeter Plugins which provides easy and quick way of defining load scenario like:
Start with N users
Start up for S seconds
Hold the load for L seconds
Shut down test threads in T seconds
Hope this helps.
first of all both Load test & Stress test can help you determine the capacity of the system.
In order to perform load test, use the "Thread Group" available in Jmeter.
http://jmeter.apache.org/usermanual/test_plan.html
while doing a load test you will have to increase the user load gradually after 1 iteration has been executed completely e.g. you want to execute load test for 100, 200, 300, .... ,1000
so first iteration you have to keep "no. of threads" as 100, run the test save the results and then change the value in "no. of threads" to 200 & so on.
In order to perform stress test, use "jp#gc Stepping Thread Group"
http://testingfreak.com/tools/jmeter/stepping-thread-group/
hope this will help.

Resources