Reputation: 669
I have two http request samplers inside a Thread Group.
I would like to ignore the first sampler when I run the tests in non GUI mode (cli).
The main reason is to ignore the first sampler in the generated HTML report.
I still need the Sampler 1 to run under the hood even if I filter when running it in cli mode.
Upvotes: 3
Views: 2110
Reputation: 58812
Send in non GUI extra parameter/JMeter property as -JignoreFirstSampler
Add JSR223 PostProcessor as a child of the first Sampler with code to ignore sampler in results:
if (props.get("ignoreFirstSampler") != null) {
prev.setIgnore()
}
Sampler 1 will still executed, but won't be shown in report
Upvotes: 2
Reputation: 168122
Put your HTTP Request samplers under the Transaction Controllers
Click Tools -> Export transactions for report
Amend generated jmeter.reportgenerator.exporter.html.series_filter
property value and remove "unwanted" transactions
Run JMeter in non-GUI mode and provide this jmeter.reportgenerator.exporter.html.series_filter
property via -J
command-line argument like:
jmeter -Jjmeter.reportgenerator.exporter.html.series_filter="^(Sampler 2)(-success|-failure)?$" -n -t test.jmx -f -l result.jtl -e -o dashboard
That's it, HTML Reporting Dashboard will contain only Sampler 2
transaction results
More information:
Upvotes: 0