Empty Output csv file is getting generated from the merge-result plugin

476 views
Skip to first unread message

Rohit Shinkar

unread,
Apr 1, 2021, 5:58:36 AM4/1/21
to jmeter-plugins
Hi,

I recently come across the merge-result plugin for my requirement to combine two execution reports ,

In that, when I gave two .csv files as an input to the merge-result plugin (both on GUI and cmd ) , I do get the output .csv generated however it only carries the header columns and no data is captured from both input files, along with this error on the terminal 

here is my command:

> lib % java -jar cmdrunner-2.2.jar --tool Reporter --generate-csv combine1.csv --input-jtl merge-results.properties  --plugin-type MergeResults

and the warning that I get on the terminal is ->
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/Users/rshinkar/Desktop/Projects/apache-jmeter-5.3/lib/xstream-1.4.11.1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


The output .csv generated has below structure:

Screenshot 2021-04-01 at 3.27.32 PM.png
Can someone please assist what could have gone wrong here ?

Thank you!
Rohit

Vincent Daburon

unread,
Apr 1, 2021, 6:32:04 AM4/1/21
to jmeter-plugins
Hi,

Use the PluginsManagerCMD command tool and not direcly the java and jar library.

Regards.
Vincent DAB.

Dmitri Tikhanski

unread,
Apr 2, 2021, 8:15:32 AM4/2/21
to jmeter-plugins
I can think only of a Jar Hell preventing the plugin from normal work. 

Try the following steps:

  1. Download latest stable JMeter version (5.4.1 as of now)
  2. Install the following plugins using JMeter Plugins Manager
  3. Make sure that files called test1.csv and test2.csv live under "bin" folder of your JMeter installation
  4. Make sure that you have merge-results.properties file in "bin" folder of your JMeter installation and it looks like:
inputJtl1=test1.csv
prefixLabel1=TEST1:
inputJtl2=test2.csv
prefixLabel2=TEST2:

Run the Merge Results plugin from the "bin" folder as:

java -jar ..\lib\cmdrunner-2.2.jar --tool Reporter --generate-csv combine1.csv --input-jtl merge-results.properties  --plugin-type MergeResults

You should get the results merged into a single file

Daniel Becroft

unread,
Jan 24, 2022, 2:10:12 AM1/24/22
to jmeter-plugins
I have the same issue as OP, but the above steps do not resolve my issue. I've copied the files into the bin folder, but the file is still being generated as an empty file.

Some other things that I have tried:
  • If I pass in an invalid filename for the merge-results.properties,  an error is generated (correctly) indicating the file does not exist:
ERROR: java.lang.IllegalArgumentException: Cannot find specified JTL file: merge-results-does-not-exist.properties
*** Problem's technical details go below ***
Home directory was detected as: C:\devapps\bin\apache-jmeter\apache-jmeter-5.4.3\lib
Exception in thread "main" java.lang.IllegalArgumentException: Cannot find specified JTL file: merge-results-does-not-exist.properties
        at kg.apc.jmeter.PluginsCMDWorker.checkParams(PluginsCMDWorker.java:90)
        at kg.apc.jmeter.PluginsCMDWorker.doJob(PluginsCMDWorker.java:104)
        at kg.apc.cmdtools.ReporterTool.processParams(ReporterTool.java:255)
        at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
        at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)


  • If I pass in the correct filename, but put in invalid paths in the inputJtl1 and inputJtl2 fields, I do not get any exceptions raised.
I can't seem to find any mechanism to turn on debug mode, or increase the verbosity of the logging. The plugin does work when run through the GUI, but that's not ideal for automation purposes. 

Vincent Daburon

unread,
Jan 24, 2022, 3:15:36 AM1/24/22
to jmeter-plugins
Hi,

In the properties file merge-results.properties
Set the absolute path for the 2 files jmeter results (like c:/project/result/loadtest1.csv use / and not \)
merge-results.properties contains :

inputJtl1= c:/project/result1/loadtest1.csv (first jmeter result file from the 1st load test)
inputJtl2= c:/project/result2/loadtest2.csv (second jmeter result file from the 2sd load test)

and launch the merge tool in the <JMETER_HOME>/bin
JMeterPluginsCMD.bat --generate-csv test1-test2.csv --input-jtl merge-results.properties --plugin-type MergeResults

Regards
Vincent DAB.

Vincent Daburon

unread,
Jan 24, 2022, 4:24:52 AM1/24/22
to jmeter-plugins
Hi,
You also need to add a prefix for the label :
merge-results.properties contains :

inputJtl1= c:/project/result1/loadtest1.csv (first jmeter result file from the 1st load test)
prefixLabel1=TEST1:
inputJtl2= c:/project/result2/loadtest2.csv (second jmeter result file from the 2sd load test)
prefixLabel2=TEST2:

Regards.
Vincent DAB.

Daniel Becroft

unread,
Jan 24, 2022, 5:30:15 PM1/24/22
to jmeter-plugins
Thanks Vincent. I have tried both of your suggestions (my merge-results.properties file already had the prefixLabel1 and prefixLabel2 values), but the file is still being generated as empty (I'm even deleting the merged.csv between runs), but the empty file is still getting generated. 

Are there any other suggestions, or any flags I can use to enable verbose debugging/diagnostics to allow me to debug it further myself?

Vincent Daburon

unread,
Jan 25, 2022, 3:59:08 AM1/25/22
to jmeter-plugins
Hi,
Do you set the path with / character and not \ ?
c:/project/result1/loadtest1.csv
not c:\project\result1\loadtest1.csv

You could put the 2 files in the <JMETER_HOME>\bin
Then you set file name without path
inputJtl1=loadtest1.csv
inputJtl2=loadtest2.csv

Regards.
Vincent DAB.

Daniel Becroft

unread,
Jan 26, 2022, 1:32:53 AM1/26/22
to jmeter-plugins
Hi Vincent,

Yes, I've tried with the fully-qualified path in the merge-results.properties files using `/` characters instead of `\`. I've also tried putting the files directly in the JMETER_HOME\bin directory and using the filename without a path. Neither solution produces a merged CSV file.

Regards,
Daniel B.

Jim K

unread,
Aug 9, 2022, 5:30:24 PM8/9/22
to jmeter-plugins
Had the same issue and just figured it out, get rid of the  default includeLabels values and set them to "includeLabels1=.*"

Mansoor Shaikh

unread,
Sep 13, 2022, 11:13:47 AM9/13/22
to jmeter-plugins
Thank you Jim K. Today, I faced same issue and your solution to remove the default values in includeLabels worked. Thank you. Now, I see that the merged output csv file is generated. It just puts the second result rows below the first results. It does not give any difference between response time. I will search further to get this. Thank you for your help.
Reply all
Reply to author
Forward
0 new messages