如何在JMeter 3.0 GUI中合并4个以上.jtl文件并生成汇总报告
Hey there! I’ve hit this exact frustrating limitation with the jp@gc - Merge Results plugin before—nothing worse than having 5 test results ready to combine only to hit a hard stop at 4. Let’s break down the most reliable fixes:
1. Adjust the Plugin’s Max File Limit via JMeter Properties
The plugin has a default hardcoded limit for input files in the GUI, but you can override this with a simple property change:
- Navigate to your JMeter installation’s
binfolder and open thejmeter.propertiesfile in a text editor. - Add this line at the bottom (replace
10with whatever number of files you need to support):mergeResults.maxRows=10 - Save the file and restart JMeter. When you open the jp@gc - Merge Results component again, you’ll be able to add up to the number of files you specified using the "Add Row" button.
2. Merge Files via Command Line (No GUI Limit)
For larger batches of files, the command line is way more efficient and avoids any GUI-based restrictions entirely. Use the JMeter Plugins Command Line Tool:
- On Windows, run this in the JMeter
binfolder:JMeterPluginsCMD.bat --tool MergeResults --input-files result1.jtl,result2.jtl,result3.jtl,result4.jtl,result5.jtl --output-file merged_result.jtl - On Linux/Mac, use:
JMeterPluginsCMD.sh --tool MergeResults --input-files result1.jtl,result2.jtl,result3.jtl,result4.jtl,result5.jtl --output-file merged_result.jtl
This command will merge as many JTL files as you list, with no upper limit (other than your system’s resources).
3. Modify the Plugin’s Source Code (Advanced, Not Recommended)
If you’re comfortable with Java and don’t mind maintaining a custom plugin version, you can tweak the hardcoded limit directly:
- Locate the
MergeResultsGui.javafile in the plugin’s source code. - Find the
MAX_ROWSconstant (set to4by default) and change it to your desired number. - Recompile the plugin into a JAR file and replace the existing one in your JMeter
lib/extfolder.
Note: This fix will be overwritten if you update the plugin later, so it’s only worth it if you have a specific need for the GUI to handle more files.
Personally, I’d go with the command line method for most cases—it’s faster, more scalable, and doesn’t require modifying core JMeter files or plugins.
内容的提问来源于stack exchange,提问作者Jamil Rahman

