jmeter(5.0) load testing and reports generation [duplicate] - jmeter

This question already has answers here:
How do I generate a Dashboard Report in jmeter?
(6 answers)
Closed 4 years ago.
I have done load testing with jmeter and my jmeter version is 5.0.
Can you please help me how to generate the reports of the results.

Given you executed JMeter in command-line non-GUI mode like:
jmeter -n -t /path/to/test.jmx -l /path/to/result.csv
You can now generate the HTML Reporting Dashboard from the result.csv file as follows:
jmeter -g /path/to/result.csv -o /path/to/dashboard/folder
The folder where you will be generating the report to must be empty.

See this new blog (16th january 2019) which explains the while process:
Reporting feature in JMeter
Besides, refer to the reference documentation :
http://jmeter.apache.org/usermanual/generating-dashboard.html

Related

Go test coverage for test files in separate module [duplicate]

This question already has answers here:
No test coverage when tests are in a different package
(2 answers)
Go Test Coverage, over different packages [duplicate]
(1 answer)
Go Coverage not including functions in other package
(2 answers)
Closed 26 days ago.
I'm running gotestsum --junitfile-testcase-classname=short --junitfile-testsuite-name=relative \ -- -coverprofile=coverage.out ./serviceName/...
The structure looks like this:
serviceName
normalModule
- file.go
- file_test.go
testModule
- file2_test.go
- file3_test.go
otherModule
- file3.go
- file2.go
How can I generate a test report that will account for all corresponding test files outside of its own module?
Note: I am trying to avoid reorg
Tried above command and expected normalModule, otherModule, and serviceName module to report coverage.
Currently the coverage report only shows a coverage for normalModule and skips the rest:
serviceName/normalModule (5ms) (coverage: 100.0% of statements)
∅ serviceName
∅ serviceName/testModule
∅ serviceName/testModule

Error while generating report in apache-jmeter-5.4.1.tgz

sh jmeter.sh -n -t filePath.jmx -l outFilePath.jtl -e -o folderPath
Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Begin size 0 is not equal to fixed size 5
In resume
Consumer failed with message :Begin size 0 is not equal to fixed size 5
currently using Java version "17" 2021-09-14 LTS
MacOS big SUR version 11.4
the properties files are fresh and values are equal to the default ones
Jmeter 5.4.1
outFile.jtl
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1632430450882,1117,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3824,557,3,3,Url_hidden,1111,0,256
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,1755,0,690
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,1755,0,690
1632430452312,585,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,585,0,144
1632430452238,758,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3832,557,3,3,Url_hidden,757,0,137
1632430452301,806,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,805,0,136
1632430452962,550,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3824,557,3,3,Url_hidden,550,0,152
1632430453328,593,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,2,2,Url_hidden,592,0,135
1632430453276,815,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3840,557,1,1,Url_hidden,814,0,142
The thread run successfully and the jtl file is created as well.
I quite new on Jmeter and tried to see where that "size" attribute is currently locate to see how change it, but could not find it on any *.properties file
any though how can be this fixed, what the message is referring to?
thanks
This error is likely due to an incompatibility of JMeter with Java 17 (as mentioned by Dmitri T).
Whilst we wait for a fix, a workaround would be downgrading to Java 16. I can confirm this solved the issue for me.
I had the same issue with:
MacOS big SUR version 11.6
Jmeter 5.4.1 (installed via brew)
Temurin 11 (LTS) OpenJDK & Temurin 8 (LTS) OpenJDK
Running Jmeter with Java 8 solved my issue. The problem was, that Jmeter always used Java 11. I struggled some days to find out, how to set the Jmeter Java version:
set the correct Java 8 Home in: /usr/local/Cellar/jmeter/5.4.1/bin/jmeter:
JAVA_HOME=$JAVA_8_HOME exec "/usr/local/Cellar/jmeter/5.4.1/libexec/bin/jmeter" "$#"
Maybe there are easier ways to set Java 8 for Jmeter - but this was the only solution which worked for me.
I had Java 8 installed however, the JMeter was picking up Java 1.17 which was nowhere in my system. So uninstalling and reinstalling jmeter, worked like a charm for me.
I cannot reproduce your issue using:
openjdk:8-jre-alpine docker image
JMeter 5.4.1
Test plan Test.jmx from extras folder of JMeter
Demo:
If you cannot reproduce the above behaviour I think you made some changes either to Results File Configuration or to Reporting Configuration or both so you need to inspect all the JMeter Properties which differ from the defaults and restore their values to the original ones.
If you need further support you need to share at least first 2 lines of your outFilePath.jtl results file. Better if possible the full file and all the .properties files from JMeter's "bin" folder.
exec commandline /usr/libexec/java_home -V
enter image description here
replace bin of jmeter JAVA_HOME
enter image description here
and then ,it is success.

JMETER 5.1.1 : Merge identical samplers from the same session (as with JMETER 3.2)

I have just upgrated from JMETER 3.2 to JMETER 5.1.1.
I have a problem in generating the JTL file.
To run a test, I use the following command:
& .\jmeter.bat -n -t "C:\test\jmx_test.jmx" -l "C:\test\jmx_test.jtl" -j "C:\test\jmx_test.txt"
Before, with version 3.2 the result of the JTL was :
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
1568895933205,686,000_Login - /test-app,200,OK,Declaration_1... 1-1,text,true,,3170,314,1,1,685,0,650
1568895935077,312,001_Login - /test-app/login/login.jsf,200,OK,Declaration_2... 1-1,text,true,,11873,1025,1,1,212,0,0
....
Now with version 5.1.1, the result is :
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1568897692191,669,000_Login - /test-app,200,OK,Declaration_1... 1-1,text,true,,3168,314,1,1,https://xxxxx.jsf,668,0,637
1568897693648,260,001_Login - /test-app/login/login.jsf,200,OK,Declaration_2... 1-1,text,true,,11871,1041,1,1,https://xxxxx;jsessionid=xxxx,199,0,0
1568897693648,199,001_Login - /test-app/login/login.jsf-0,302,Moved Temporarily,Declaration_2... 1-1,text,true,,407,655,1,1,https://xxxxx;jsessionid=xxxx,199,0,0
1568897693852,56,001_Login - /test-app/login/login.jsf-1,200,OK,Declaration_2... 1-1,text,true,,11464,386,1,1,https://xxxxx;jsessionid=xxxx,55,0,0
....
As next I create reports with this command :
& ./CMDRunner.jar --tool Reporter --input-jtl "C:\test\jmx_test.jtl" --plugin-type AggregateReport --generate-csv jmx_test.csv
I have problems because the samplers are duplicated.
With version 5.1.1, is it possible to merge, as before, the 3 labels of the same sampler (001_Login - /test-app/login/login.jsf / 001_Login - /test-app/login/login.jsf-0 / 001_Login - /test-app/login/login.jsf-1) ?
In advance, thanks!
It seems there is a redirection happening and in your HTTP sampler and "follow redirection" option is checked. Uncheck it and check "redirect automatically" and run it again.
If I change this result, it may change the result from what I have read (http://www.testingdiaries.com/difference-between-redirect-automatically-and-follow-redirects/).
I think I've found the solution.
I have changed the value of the "subresults.disable_renaming" property in the "jmeter.properties" file :
# Since version 5.0 JMeter has a new SubResult Naming Policy which numbers subresults by default
# This property if set to true discards renaming policy. This can be required if you're using JMeter for functional testing.
# Defaults to: false
subresults.disable_renaming=true
What do you think about that?

DTProbLog query

i'm using DTProblog in ProbLog version 2.1.0.34 downloaded
from the bitbucket repository at https://bitbucket.org/problog/problog/src/develop/.
To run a program which uses dtproblog i type on terminal
$ problog dt program.pl
Looking at the examples in the bitbucket repository at
https://bitbucket.org/problog/problog/src/develop/test/dtproblog/viralmarketing.pl
i see that several queries are allowed, such as dtproblog_ev/2 ecc...
How can i run one of those queries from the command line?
I've tried also to open a shell using
$ problog shell
but when i try to load a program using consult/1 (https://problog.readthedocs.io/en/latest/cli.html#interactive-shell-shell)
i have an error:
?- consult('viralmarketing.pl').
Traceback....
TypeError: _builtin_consult() takes at least 2 arguments (3 given)
Thanks for the help.
I've posted the same question in the ProbLog mailing list. I've received an answer: basically, queries as dtproblog_ev/2 are no more supported in the newest version of ProbLog.
Regarding the consult/1 issue, it was a bug and now is fixed.

Jmeter error occurred when running jmeter.bat

just download and extracted jmeter on my pc.
when i double click jmeter.bat, this error occurred
An error occurred: class com.google.common.collect.AbstractMapBasedMultimap over
rides final method setMap.(Ljava/util/Map;)V
errorlevel=1
Press any key to continue . . .
why is jmeter have to do with com.google.common.collect.AbstractMapBasedMultimap.
any idea what is wrong with my environment?
im using
apache-jmeter-2.11 and java version "1.7.0_51"
i have also extracted 5 plugins: standard set, extras with lib set, extras set, WebDriver set and Hadoop set.
updated:
i sort of found out the problem. It is because i din't extract the plugins in correct order.
it must follow this order: Extras > ExtrasLib > Hadoop > Standard > WebDriver when extracting the plugins into jmeter directory. Then the jmeter can be started without error.
You error may be related to the presence of 2 different versions of GUAVA library.
I suppose you are using some third party JMeter plugin (possibly JMeter-Plugins + Selenium Driver).
You may find this interesting:
http://www.simplehooman.co.uk/2013/03/jmeter-could-not-initialize-class-org-apache-jmeter-gui-util-menufactory/

Resources