Jmeter exception while generating report - jmeter

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

Related

Jmeter || Error generating the report: java.lang.NullPointerException while running test from CMD

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

Why isn't JMeter saving some requests statistics on non-GUI mode?

I'm doing some tests using JMeter but it seems that when running the test on GUI mode, some HTTPs requests response statistics can be seen via listeners but, when running the same test on non-GUI mode the same responses aren't saved in the jtl file and thus aren't shown in listeners when loading the jtl file on GUI-mode.
After running the test on GUI mode:
Results after running test
And then, running the same test but on non-GUI mode:
Command:
path/to/jmeter -n -t path/to/test.jmx -l path/to/results.jtl -j path/to/logfile.log -JnumUsers=10 -Jjmeterengine.force.system.exit=true -Dnashorn.args=--no-deprecation-warning
Results after loading the jtl file into a listener
You can see that the /buscarAvaliacaoAluno and /alterarAvaliacaoAluno responses aren't there anymore.
edit with error in log
It seems that it says that it can't find the javascript engine used by a postprocessor
After reading this post I understood that if I'm using java 11 or above, using javascript shouldn't work, but when running java -version I get "openjdk version "1.8.0_292" and echo ${JAVA_HOME} I get /usr/java/jdk1.8.0_91
javax.script.ScriptException: Cannot find engine named: 'javascript', ensure you set language field in JSR223 Test Element: Pega id's questionĂ¡rios
at org.apache.jmeter.util.JSR223TestElement.getScriptEngine(JSR223TestElement.java:101) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.extractor.JSR223PostProcessor.process(JSR223PostProcessor.java:44) [ApacheJMeter_components.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:940) [ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:572) [ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.3]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
We cannot provide a comprehensive response without seeing the test plan, the full listener output and the jmeter.log file
If you don't see a sampler result in the .jtl file most probably it hasn't been executed and there could be various reasons for not executing the sampler.
You're looking into old results. Given you provide number of users as 50 I would expect at least 50 sampler results and you have only 10. Try adding -f command-line argument to your JMeter startup script so it would overwrite the existing .jtl file with the new data
You have logic controllers like If Controller for conditionally executing your /buscarAvaliacaoAluno and /alterarAvaliacaoAluno and the condition is not met
You have "Action to be taken after a Sampler error" other than Continue in Thread Group so your test fails somewhere before these samplers and hence they are not being executed
etc.

Jmeter - Generating HTML Report

i have run the existing csv file in Non-Gui mode and ended in error, An error occurred: Mismatch between expected number of columns:17 and columns in CSV file:13, check your jmeter.save.saveservice.* configuration or check line is complete
errorlevel=1
Press any key to continue . . .
I have done all the configuration as per the user manual but still i cant able to generate the report in html / dashboard
i can able to generate report on existing jtl file and while on test run but via csv file i cant
Someone HELP ME.....

How to add threadName to Jmeter HTML report (error section)

I am facing an issue when I try to analyze Jmeter HTML report.
I use this command to run and create HTML report
jmeter -n -t C:\JMETER_RTB_REQUEST\Framework\Test_Fragment\Test_Fragment_15_02_2018_vol2.jmx -l C:\Users\bs\Desktop\Jmeter_reports\results_geo.csv -e -o C:\Users\bs\Desktop\Jmeter_reports\HTML
The problem is that when I am opening the Html file, under error section it not mention on which test (thread group) it failed, so I can not understand what test failed. In the CSV exists thread name column, but not in the HTML error section. Is their any solution?
[][Thread groups from test plan]
[][CSV report thread Name exists(HTML1 is thread name)]
[[HTML report not mentioned thread Name]]
Since JMeter 4.0, you can customize assertion message:
So you would put custom message assertion including Thread Name calling __threadNum function.

Missing values from JMeter results file when run remotely

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

Resources