Problem with Ultimate Thread Group in JMeter - jmeter

This is what I expect:
expected
and this is what I get:
actual
Any ideas what I'm doing wrong?
I created separate project with dummy sampler and I've got the following Result!?
Test was run from cmd with the following command:
jmeter -n -t "C:\jmeter\_proj\DummyTest.jmx" -l "C:\jmeter\_proj\UltDummyTest01.jtl" -j "C:\jmeter\_proj\UltDummyTest01.log" -Jdatafile=data/Users1000.csv -DTHREADSADD=200 -DSTARTUP=10 -DSHUTDOWN=10 -DD1=0 -DD2=100 -DD3=200 -DD4=300 -DD5=400 -DH5=200 -DH4=400 -DH3=600 -DH2=800 -DH1=1000
Here is the solution on google drive

Ultimate Thread Group should be precise enough, there should be other factors which shorten ramp-up time and overall test duration and your two partial screenshots don't tell the full story.
Make sure to run your JMeter test in command-line non-GUI mode, 1000 threads is way too much for the GUI-based test execution
Make sure to follow JMeter Best Practices
If you're using Precise Throughput Timer or Throughput Shaping Timer check its settings
Check jmeter.log file for any suspicious entries
In case of problems update your question with jmeter.log file and schematic view of your test plan (Tools -> Generate Schematic View)

Related

How to set the 4000 users and 1 hour duration using JMETER

In Jmeter I have a scenario like
Load tested with 4000 users and 1 hour duration
759965 requests made and out of which one request failed on an average 18894.13 requests made per second.
This was the earlier scenario and I want to make the same scenario again with the above information. Can someone guide me how to set up the environment and also the results. I have designed my script using Co-relation with the help regular expression extractor.enter image description here
For the normal Thread Group the configuration would be something like:
It would also be a good idea to use some ramp-up period so the load would increase gradually and you could correlate increasing load with other metrics like response time or transactions per second.
You might also want to use one of Custom Thread Groups which can be installed as JMeter Plugins, they provide easy visual way to define the number of threads, test duration, ramp-up, ramp-down, time to hold the load, eventual spikes, etc.
Once you define your desired workload you should run your test in command-line non-GUI mode, with regards to the test results the easiest option is to generate HTML Reporting Dashboard

Is there a way to perform the GUI mode 'Validate' on the command line in JMeter?

I have many JMeter Web tests that I need to validate and it's laborious to open each test, right click and Validate on each one.
Is there any way to run the single thread, single execution 'Validate' test on the command line?
Currently it is not something you cannot trigger via command line, however you can achieve the same using JMeter Properties, i.e. instead of hard-coding number of threads in Thread Groups, sleep time in Timers, percent execution in the Throughput Controller, etc. use __P() function instead like:
${__P(threads,100)}
or
${__P(loops,50)}
So by default your Thread Group will run 100 virtual users for 50 loops. However you will be able to override the values using -J command-line argument like:
jmeter -Jthreads=1 -Jloops=1 -n -t test.jmx -l result.jtl
This way the test will execute with 1 virtual user and 1 loop. You can manipulate other properties using similar approach. Check out Apache JMeter Properties Customization Guide for more details.

Disable/Enable all Test Action controllers in JMeter test

I have placed many DIFFERENT think times (pauses) in JMeter test. In this way I am trying to simulate real user think times, because at different places user will need different times to think/wait. Sometimes he will need 5 sec to figure out his next action, and sometimes he will need 15 sec. As I manage to check Test Action Controllers are the only way for me to do this. BUT, my problem is that while I am creating/repairing test I don't want to wait for all these pauses when I run the test just to check whether my change is passing. I want some way to easily disable all Test Action controllers during creation of test, and then when I want to run real test with bunch of concurrent threads then just to easily enable all pauses.
You first modify your Test Action this way:
Set sleep to 0
Add as a child to each one a Timer with pause you want
Then
There is a menu called Start no pause in the GUI which is here exactly for this need:
http://www.ubik-ingenierie.com/blog/jmeter-new-gui-features-to-increase-your-productivity/
There is also since 3.0 a "Validation Mode" that you can acces by right click on Thread Group and select validate
https://jmeter.apache.org/changes.html
I believe the easiest way of doing it is running your test via Taurus tool. It has possibility to enable/disable Test Elements basing on their names so you will be able to switch your Test Actions samplers on and off.
See Modifications for Existing Scripts chapter for more details.
Example Taurus YAML config to disable Test Action samplers. Save it as i.e. test.yml in the same folder your .jmx script lives
---
scenarios:
modification_example:
script: test.jmx # Name of your original JMeter test script
modifications:
disable: # Names of the tree elements to disable
- Test Action
execution:
- scenario: modification_example
Running bzt test.yml -gui command will open JMeter GUI with modifications applied.
Taurus entry level information: Navigating your First Steps Using Taurus
Don't waste your time trying "Run no pauses" and "Validate" options, the guy doesn't seem to know how does JMeter work.
All right, here's JMeter-only solution via Beanshell Sampler
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.tree.JMeterTreeNode;
import org.apache.jmeter.sampler.TestAction;
GuiPackage guiInstance = GuiPackage.getInstance();
guiInstance.getTreeModel().getTestPlan();
List testactionlist = guiInstance.getTreeModel().getNodesOfType(TestAction.class);
for (Object testAction : testactionlist) {
JMeterTreeNode testActionSampler = (JMeterTreeNode) testAction;
testActionSampler.setEnabled(false);
}
I used Test Actions because I did not understand how timers are working. I thought they are always applied to all samplers (which is not true). I can easily accomplish what I want with constant timer. So using test actions wasn't a must. I will just add constant timer to specific sampler and it will be applied only to this sampler. Sorry if I made confusion with a way I asked the question :(
If you open the test in any text editor you will see all the test actions like
you can easyly find & replace all " testname="Test Action" enabled="true" " to enabled="false"

pause and resume jmeter execution

I am looking for an option to pause and resume JMeter execution (single/multiple threads).
1. Pausing and Resuming through command line
2. From the Jmeter UI
3. By coding in some language in a sampler of Jmeter
4. Using a JMeter plugin
Any of the above methods is fine.
Any thoughts and solutions are greatly appreciated.
I would suggest going for Constant Throughput Timer
Despite word "constant" in its name, you can use i.e. JMeter Property via __P() function as "Target Throughput" value.
Command-line: you can pass this property value via -J command-line argument like:
in JMeter define i.e. throughput property as: ${__P(throughput,)}
"tell" property value to JMeter as jmeter -Jthroughput=100 -n -t ....
There is no way to do it from JMeter GUI without restarting the test. In general it is not recommended to run JMeter test in GUI mode.
You can also amend the property value during the runtime
for example from Beanshell Test Elements using the following script:
props.put("throughput", "300");
using Beanshell Server
I'm pretty much sure that you'll receive a number of suggestions to use Test Action sampler from not very competent people who didn't bother to familiarize themselves with documentation which states:
TargetCurrent Thread / All Threads (ignored for Pause)
So please don't waste your time on the Test Action sampler
I suggest you follow the suggestion made by Oliver E. on user mailing list:
http://mail-archives.apache.org/mod_mbox/jmeter-user/201607.mbox/%3cCAK4Z_0AJ2c0_L==ByfgZ16FGgkyT5S9UnzboOaj3qc9PU94LSQ#mail.gmail.com%3e
Regarding your questions:
1/ follow 1 + 3 as per Dmitri Answers
2/ not possible yet :)
3/ Follow mailing list answer
4/ Not possible

How can I test the limit of the number of threads with Jmeter

Is it possible to automate the load tests in Jmeter and increase the number of threads until the first error is observed?
For example I start with testing 16 threads for every seconds and increase the number until i receive an error. But instead of doing this manually can I let this run automatically?
Looking into Pre-defined Properties section of JMeter's User Manual on Functions there is a JMeterThread.last_sample_ok variable holding result of the last sampler execution.
So if you build your test plan as follows:
Sampler which does test action
If Controller checking whether previous sampler was successful
If not - relevant actions (stop test, send email, stop ramping up virtual users, etc.)
The value you need to put in "Condition" input of If Controller should look like
"${JMeterThread.last_sample_ok}"=="false"
See How to use JMeter's 'IF' Controller and get Pie for more information on JMeter's If Controller.
Regarding threads in jmeter You may find those 2 links interesting:
What is the highest number of threads that is reasonable to simultaneously run in Jmeter?
JMeter max. thread limit
Regarding your methodology, why not use slow rampup and see the limit using what Dmitri T has provided ?

Resources