Hay Guys, I'm trying to use JMeter(5.3) non-GUI and GUI mode to do loading test, but in the same condition I get different request test.
For example, if I calling default.aspx and setting
Users : 1, Loop Count: infinite, Duration: 3s
In GUI mode summary report, I'll get
Lable : default.aspx.aspx-1, Sample : 2, Average: 854
But in non-GUI mode, I'll get
Lable : default.aspx.aspx-1, Sample : 2, Average: 622
Lable : default.aspx.aspx-1-0, Sample : 2, Average: 33
Lable : default.aspx.aspx-1-1, Sample : 2, Average: 588
Why I have 2 more data -0 and -1 on the non-GUI result?
I didn't change any setting and config when using non-GUI mode, does anyone can explain this question? Thanks.
1 Answers
My expectation is that this is due to redirection, i.e. very first response has HTTP Status code of 3xx and you're getting 3 lines in the .jtl results file like:
- Sum of response times of lines 2 and 3
- Redirection result
- Redirection target result
Something like this in the View Results Tree listener:
The behaviour is absolutely expected and for instance if you generate HTML Reporting Dasbhoard out of the .jtl results file like:
jmeter -g /path/to/jtl/result/file -o /path/to/dashboard/folder
you will see only 1 sampler there
However if you plan to continue using Summary Report listener for results analysis and don't want to observe these redirection responses there just set jmeter.save.saveservice.subresults
property to false
, it can be done in 2 ways:
Pass the property via -J command-line argument like:
jmeter -Jjmeter.save.saveservice.subresults=false -n -t test.jmx -l result.jtl
Add the following line to user.properties file:
jmeter.save.saveservice.subresults=false
More information Apache JMeter Properties Customization Guide