2

I was trying to integrate apache-jmeter with jenkins pipeline.We are using apache-jmeter version 5.1 and intalled the performance plugin version 3.0 in jenkins. D:\apache-jmeter-5.1\bin\jmeter.bat -Jjmeter.save.saveservice.output_format=xml -n -t C:\Users\temp\Downloads\tests.jmx -l C:\Users\temp\Downloads\tests.jtl """

Main goal is to get aggregate report for each individual thread group. Have tried 3 different alternatives which are mentioned below:

bat """ D:\apache-jmeter-5.1\bin\FilterResults.bat --output-file C:\Users\temp\Downloads\filteredout.csv --input-file C:\Users\temp\Downloads\tests.jtl --include-labels "Result1,Result2,Result3,Result4" """ Using the above command to get the aggregate report by passing the input as jtl file,the outputfile filteredout.csv is not getting generated.But while using the --exclude-labels the output file is getting generated but it is not the aggregate report, getting report in the form of jtl.

bat """ D:\apache-jmeter-5.1\bin\JMeterPluginsCMD.bat --generate-csv C:\Users\temp\Downloads\aggregatereport.csv --input-jtl C:\Users\temp\Downloads\tests.jtl --plugin-type AggregateReport """ Using the above command to get the aggregate report by passing the input as jtl file, getting aggregate report with 90,95,99 percentile lines but not getting the thread group name.

bat """ java -jar D:\apache-jmeter-5.1\lib\cmdrunner-2.2.jar --tool Reporter --generate-csv C:\Users\temp\Downloads\AggregateReportnew.csv --input-jtl C:\Users\temp\Downloads\tests.jtl --plugin-type AggregateReport""" Using the above command to get the aggregate report by passing the input as jtl file,getting aggregate report with 90,95,99 percentile lines but not showing report for each individual group.

Using Filter Results Tool version 2.2,Synthesis Report version 2.2,JMeterPluginsCMD Command Line Tool version 2.2 .

Is there any chance that my idea will be possible in realtime? If so please help with this issue

1 Answers1

0

How about adding the Thread Group Name as the prefix/postfix to the Samplers labels using i.e. __threadGroupName() function

This way you will be able to distinguish samplers originating from different thread groups:

enter image description here

If you have a lot of samplers you can append the name of the Thread Group in the runtime using i.e. JSR223 PostProcessor and the following Groovy code:

prev.setSampleLabel(prev.getSampleLabel(true))
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks Dmritri, Mentioned the thread group name along with sampler labels in jmx file .I wanted to do jmeter scan through Jenkins,using performance plugin for this in jenkins and passing the above commands.As include group name in label option is available in Jmeter GUI, through command line not getting report same as from gui i.e including thread groupname along with label. – user19484565 Jul 05 '22 at 11:34
  • For example having thread group 1 and thread group 2 with same label name as label 1 then need to get report as threadgroup 1 label 1 and threadgroup2 label 1 separately.I am getting report as combined don't need in that way need it separately and this to be done through command line.Please help – user19484565 Jul 05 '22 at 11:35