cmd runner not working for jmeter 3.0 - jmeter

I am converting jtl files to csv using cmd runner. I am using jmeter 3.0
I have placed all required files of cmd runner at lib/ext files.
after running below command,
java -jar cmdrunner.jar --tool Reporter --generate-csv C:\Aggregate_Report.csv --input-jtl C:\a.jtl --plugin-type AggregateReport
I am getting below error,
ERROR: java.lang.RuntimeException: java.lang.ClassNotFoundException: kg.apc.jme
er.vizualizers.AggregateReportGui
How to solve this issue?

After many trial and error scenarios, I searched the workaround by myself.
cmd runner is not available in jmeter 3.0, you have to download it from jmeter 2.4, then place lib/extr folder to jmeter 3.0 folder. It is working for me.

Related

Download plugin jar file and put it in the lib/ext

I have a problem that I want to execute JMeterPluginsCMD.bat command so I just download the jmeter-plugins-cmd-2.2.jar file and put it in the lib/ext folder but I still cannot run JMeterPluginsCMD.bat command. I' m wondering if the JMeterPluginsCMD.bat file should show in my bin folder after putting jar in the lib/ext? If it should, then why my JMeterPluginsCMD.bat file is not shown? Please help, thanks!
If you're looking for JMeterPluginsCMD.bat file you can grab one from here:
https://github.com/undera/jmeter-plugins/blob/master/tools/cmd/src/main/resources/kg/apc/cmdtools/JMeterPluginsCMD.bat
Be aware that the recommended way of installing JMeter plugins and keeping them up-to-date is using JMeter Plugins Manager
Install JMeter Plugins Manager
Restart JMeter
Open the plugins manager and install Command-Line Graph Plotting Tool
Restart JMeter once again and you will have JMeterPluginsCMD.bat in your JMeter's "bin" folder

Merge Results plugin jmeter on Non GUI mode

Can someone share a sample line which will explain how to merge multiple jtl file into single jtl file using jmeter plugins
Error while trying to merge results from different JTL files using the MergeResults PLUGIN in JMETER NON GUI mode
Using JMeter Plugins Manager install:
Merge Results Plugin
JMeterPluginsCMD Command Line Tool
Make sure that files you're going to merge are present in JMeter's "bin" folder and called
test1.csv
test2.csv
Amend merge-results.properties file (in "bin" folder of your JMeter installation) to look like:
# === FILE 1 ===
inputJtl1=test1.csv
prefixLabel1=TEST1:
includeLabels1=.*
excludeLabelsl=
includeLabelRegex1=true
excludeLabelRegex1=
startOffset1=
endOffset1=
# === FILE 2 ===
inputJtl2=test2.csv
prefixLabel2=TEST2:
includeLabels2=.*
excludeLabels2=
includeLabelRegex2=true
excludeLabelRegex2=
startOffset2=
endOffset2=
Execute the following command from "bin" folder of your JMeter installation:
PluginsManagerCMD --tool Reporter --generate-csv merged.csv --input-jtl merge-results.properties --plugin-type MergeResults
Open merged.csv file with the Listener of your choice - you should see cumulative results for both files.

JMeter Error: Unable to access jarfile CMDRunner.jar

I have downloaded "Command-Line Graph Plotting Tool" and "jpgc - Standard Set" from JMeter Plugins Manager.
I am executing below command from Jmeter/lib/ext path as :
Command 1:
java -jar CMDRunner.jar --tool Reporter --generate-csv C:\jtl\Aggregate_Report.csv --input-jtl C:\jtl\file1.jtl --plugin-type AggregateReport -cp "cmdrunner-2.0.jar;JMeterPlugins-Extras.jar"
Command 2:
java -jar C:\Software\apache-jmeter-2.13\apache-jmeter-2.13\lib\ext\CMDRunner.jar --tool Reporter --generate-csv C:\jtl\Aggregate_Report.csv --input-jtl C:\jtl\file1.jtl --plugin-type AggregateReport -cp "cmdrunner-2.0.jar;JMeterPlugins-Extras.jar"
Command 3:
java -jar C:\Software\apache-jmeter-2.13\apache-jmeter-2.13\lib\ext\CMDRunner.jar --tool Reporter --generate-csv C:\jtl\Aggregate_Report.csv --input-jtl C:\jtl\file1.jtl --plugin-type AggregateReport
For above all the 3 commands, error is displayed as
"Error: Unable to access jarfile CMDRunner.jar"
Kindly provide your suggestions.
JMeter version is 2.13
If you use Jmeter 3.2 it contains a file in the bin called
JMeterPluginsCMD.bat
using the following command worked for me when doing it manually.
JMeterPluginsCMD.bat --tool Reporter --generate-csv "AggregateReport.csv" --input-jtl "results.jtl" --plugin-type AggregateReport
When doing it using Jenkins got another error which i am trying to figure out.
Error details:
ERROR StatusLogger No log4j2 configuration file found. Using default
configuration: logging only errors to the console. Set system property
'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to
show Log4j2 internal initialization logging.
Check if you are facing issue with downloading cmdrunner you should download that jar manually from here
put that jar at JMETER-HOME\lib folder and restart jmeter.

javax / websocket / CloseReason $ CloseCode

I refer to this tutorial
https://blazemeter.com/blog/websocket-testing-apache-jmeter
I run websocket java in jmeter ,but jmeter log responsed like this -
jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: javax / websocket / CloseReason $ CloseCode
I do not know how to solve this problem ?
Stacktrace
Thanks in advance!
Any "NoClassDefFoundError" usually means that either you don't have the relevant .jar in JMeter classpath or you haven't restarted JMeter after dropping the .jar into its lib or lib/ext folder.
I would suggest the following:
Get the latest JMeter version (it is 3.0 at the moment)
Install JMeter Plugins Manager
Install WebSocket Sampler via the plugins manager
If you're trying to run JMeter via JSR223 Sampler and Java code example - the same, make sure Tyrus libraries are in JMeter classpath and JMeter is restarted after that.

Bamboo Script Task using inline bat commands failing

Im new to Bamboo and just trying to run this two lines of code in the script task.
cd C:\apache-jmeter-2.11\bin\
jmeter-n.cmd Test.jmx​
It is failing and it is showing this message on the logs.
Failing task since return code of [c:\Program Files\Bamboo\temp\TEST-16-ScriptBuildTask-4637676047487491491.bat] was -1 while expected 0
Is path to JMeter correct?
Does Test.jmx script live in JMeter's bin directory
Do you have "java.exe" in your PATH environment variable? Does Bamboo pick it up?
Can you look into "C:\apache-jmeter-2.11\bin\Test.log" file to see whether they are errors there. If there is no such a file one of points 1-3 isn't met.
Are you aware of Bamboo JMeter Plugin?
By the way, Bamboo is capable of executing Ant or Maven tasks and JMeter test can be kicked off using these build systems as well.
References:
Automated Performance Testing using Maven and JMeter
JMeter Maven Plugin
5 Ways To Launch a JMeter Test without Using the JMeter GUI

Resources