I am trying to define a percentage of threads for each ThreadGroup in my load testing .jmx file, and pass the total number of threads from taurus config .yaml file.
However, taurus fails to parse the expression, even though when I try to debug it using jmeter I can see that the expressions works. ( I am setting the total number of users in user.property file in jmeter).
This is my yaml config file.
---
scenarios:
student_service:
script: ~/jmeter/TestPlan.jmx
variables:
addressThread: 100
think-time: 500ms
execution:
- scenario: student_service
hold-for: 5m
versions I am using:
Taurus CLI Tool
MacOs10.13.6
Jmeter 5.0
You're mixing properties and variables.
It should be:
---
scenarios:
student_service:
script: ~/jmeter/TestPlan.jmx
properties:
addressThread: 100
think-time: 500ms
execution:
- scenario: student_service
hold-for: 5m
And in JMeter, you should be using __P function:
${__P(addressThread)}
Still, there is a bug in current version of Taurus 1.13.2, so you need to wait for next version:
https://groups.google.com/d/msg/codename-taurus/QggRz9QDnO0/_FEGllDoGAAJ
Related
I am trying to execute a test from CMD but getting following error :
Command : jmeter -n -t D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\bin\UserServices.jmx -l D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\PerformanceData\MICR_Project\MICR_TestResults\DebugOOM\DebugOOM_1.csv -e -o D:\Users\load.test\Desktop\Performance\apache-jmeter-5.5\PerformanceData\MICR_Project\MICR_TestResults\DebugOOM\DebugOOM_1 -JURL=localhost -JPort=7058 -JUser=5 -JRampUp=1 -JDuration=900 -JRampUpSteps=1 -JOutputFileName=OutputOOM.jtl -JErrorFileName=ErrorOOM.jtl -JFlow1=100
What could be the possible reasons for this error as its not very informative.emphasized text
The NullPointerException is related to generating the HTML Reporting Dashboard, the dashboard generation fails because your test failed to execute at all - no Samplers were run.
The reason why no Samplers were run can be found in jmeter.log file, the most "popular" reasons are:
The number of threads in the Thread Group is 0
The test uses CSV Data Set Config for parameterization and the CSV file is not present.
The test uses a JMeter Plugin and the plugin is not installed
I am trying to generate html report using robotframework but getting below error
JMeterLibException: 'No samples were found in a log file.'
Command used :
Run Jmeter ${jmeter} ${jmxPath} ${logPath} -JudvData=${excelData} -Jport=${port} -Jurl=${url} -JSMS.group=1
Analyse Jtl Convert To Html ${logPath}
jtl file is getting generated successfully but facing issue will converting jtl to HTML
Below is the log details ,
If there are no results it means that JMeter script execution has failed somewhere somehow, in this case you can check:
Robot Framework log file
JMeter log file
If you cannot figure out what's wrong from the JMeter log file it is possible to increase logging verbosity either for individual components or for the overall application via log4j2.xml file (lives in "bin" folder of your JMeter installation), see How to Configure JMeter Logging article for more details.
The most common reasons are:
The number of threads (virtual users) or loops (iterations) in Thread Group is 0
Missing data file referenced in CSV Data Set Config
Missing JMeter Plugin
I am trying to invoke Jmeter script with user defined properties with YAML which I am able to change and execute with below configuration.
However if the test started and I need to increase the user on any thread - without stopping the test, how can I achieve that? Let's say the test was started with Thread1 value as 30 and now if I need to change it to 50 dynamically on runtime. I did not find a way myself. Please advise.
execution:
- #concurrency: ${__P(my_conc,3)} # use `my_conc` prop or default=3 if property isn't found
ramp-up: 1
hold-for: ${__P(my_hold,1)}
scenario: simple
modules:
jmeter:
properties:
my_hold: 60
scenarios:
simple:
variables:
#User DEFINED variable
Sampler1 : TestSampler1
Sampler2 : TestSampler2
script: SampleYAMLJMeter.jmx
properties:
#Thread Level variable
thread1 : 30
thread2 : 45
Add the following global JMeter properties:
modules:
jmeter:
properties:
beanshell.server.port: 9000
beanshell.server.file: ../extras/startup.bsh
Create the setconc.bsh file under .bzt/jmeter-taurus/x.x.x/lib folder and put the following code into it:
org.apache.jmeter.util.JMeterUtils.setProperty("my_conc", args[0]);
That's it, whenever you need to change the concurrency of your tests just execute the following command from the .bzt/jmeter-taurus/x.x.x/lib folder:
java -jar bshclient.jar localhost 9000 setconc.bsh 1234
replace 1234 with the actual concurrency you want to achieve
More information:
Beanshell server
How to Change JMeter´s Load During Runtime
I have following requirements to execute the performance test via Taurus.
Requirements:
1. A single jmx on multiple(distributed) jmeters
2. For every Jmeter an unique IP address to be passed at run time
3. For every Jmeter a set of unique .csv path has to be provided in .yml(as data source)
4. All Jmeters should run in parallel and report should be combined of all.
Tried with following, but unable to achieve. Let me know or share the sample .yml if any one done such kind of scenario.
execution:
- scenario:
# scenario1:
script: varTest.jmx
distributed:
- localhost:1099
variables:
host: "10"
- scenario:
# scenario2:
script: varTest.jmx
distributed:
- localhost:2010
variables:
host: "20"
In this,need to override hosts dynamically with option -o.
It doesn't contain csv datasource details, pls share the how to create a .yml for such requirement.
Thanks..
You could try something like:
---
execution:
- distributed:
- localhost:1099
scenario:
script: varTest.jmx
distributed:
variables:
host: "10"
- distributed:
- localhost:2010
scenario:
script: varTest.jmx
variables:
host: "20"
References:
Run JMeter in Distributed Mode
Running Taurus in Command Line
Taurus - Working with Multiple JMeter Tests
When running a test which makes use of the of the Jmeter-Plugins listener Response Times vs Threads or Active Threads Over Time remote running of the test plan produces a results file which contains missing results used to plot the actual graph, however when run locally all results are returned. E.g. when using the Response Times vs Threads:
Example of a local result:
1383659591841,59,Example 1,200,OK,Example 1 1-579,text,true,183,22,22,59
Example of a remote result:
1383659859149,43,Example 1,200,OK,Example 1 1-575,text,true,183,43
Note the last two fields are missing
I would check the script definition of the two server: maybe some configuration for the "Write results to file" controller has been changed.
Take the local jmx service and copy it to the remote server.
Also, look for differences in the "# Results file configuration" section of jmeter.properties file.
Make sure that on all of the slave/remote servers the jmeter.properties file within $JMETER_HOME/bin has the following setting
jmeter.save.saveservice.thread_counts=true
By default this is set to false (and commented out)
For more informtation:
JMeter Plugins Installation