Jmeter GUI testplan jmx VS Jmeter Command line testplan jmx - jmeter

What are the differences between GUI and Non_GUI JMX files ?
Why I am getting these errors ?
Can I just take a JMX file created by Jmeter
GUI and use it on command line Jmeter ?
I tried jmeter on my windows box, works !! Now I want to run this on some remote server ( LINUX ) which does not have GUI, I tried using command line jmeter
Command : ./jmeter.sh -n -t loop.jmx -l log.jtl
following is taken from jmeter.log
2015/03/04 14:21:53 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/03/04 14:21:53 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2015/03/04 14:21:53 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2015/03/04 14:21:53 ERROR - jmeter.JMeter: Uncaught exception: java.lang.VerifyError: org.apache.xpath.functions.SecuritySupport
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.t java.lang.ClassLoader.defineClass(ClassLoader.java:275)

I was able to resolve this issue after looking at this question
Causes of getting a java.lang.VerifyError
I also realized that, I can create JMX on GUI jmeter and use it over Commandline jmeter

.jmx files for GUI and non-GUI aren't different, JMeter .jmx files are basically XML files. Moreover, non-GUI way is the recommended option of running a JMeter test.
So use the following checklist:
Use the latest JMeter version (2.12 as for now)
Use the latest Java version. JMeter 2.12 is compatible with Java 8. It is recommended to use Java SDK from Oracle and if your operating system allows choose 64-bit version.
Make sure that JVM options are identical
You can check your JVM version and vendor by executing java --version command.

Related

jmeter.log file not updated when run in non-GUI mode (using JMeter 5.2.1)

I'm using JMeter 5.2.1 and when I run some test in GUI mode (or even start the GUI mode), the jmeter.log is populated. But when I use non-GUI mode, nothing is happening.
Command line : "M:\Apps\apache-jmeter-5.2.1\bin\jmeter" -Jthreads=1 -Jrampup=20 -n -t "M:\Data.....\test.jmx" -l "M:\Data\test.csv".
Test runs fine and generates csv, but the jmeter.log doesn't get touched. Right after the test completes, JMeter console is closed down so can't even see if there's any further errors.
My understanding is this jmeter.log should be updated from both GUI and non GUI test runs. Am I missing something?
jmeter.log is written in the folder of execution
So if you execute non GUI (CLI) mode it will append/create jmeter.log in your folder
See also related command line log options:
-l, --logfile <argument>
the file to log samples to
-i, --jmeterlogconf <argument>
jmeter logging configuration file (log4j2.xml)
-j, --jmeterlogfile <argument>
jmeter run log file (jmeter.log)
Your understanding is correct, however it might not be the case regarding your understanding regarding where to find the jmeter.log file.
If you're running JMeter from it's "bin" folder - the jmeter.log file will be generated/updated in this folder
If you're running JMeter from another folder, it will be generated in that folder. If this is your case - instead of looking for updated log under M:\Apps\apache-jmeter-5.2.1\bin look for in in %cd%\jmeter.log
If the above hints don't help - most probably your log4j2.xml file got corrupted somewhere somehow, get the brand new version from JMeter GitHub
If you want JMeter to store the log under M:\Apps\apache-jmeter-5.2.1\bin folder no matter where you run it from - replace this line:
<File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}" append="false">
with this one:
<File name="jmeter-log" fileName="M:/Apps/apache-jmeter-5.2.1/bin/jmeter.log}" append="false">
and on next start of JMeter you will see the "log update" you're looking for.
More information: How to Configure JMeter Logging
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so it might be a good idea to perform an upgrade

JMETER_HOME environment variable is not defined correctly but build is successful and the script works fine in Jmeter GUI and cmd prompt

I have created a jmeter jmx script and it is getting executed perfectly in GUI and non GUI mode. I have configured the same in Jenkins but I am getting the build success with an error message as "The JMETER_HOME environment variable is not defined correctly
This environment variable is needed to run this program"
I have also tried setting the JMETER_HOME as E:\apache-jmeter-4.0 in User variables and Path as E:\apache-jmeter-4.0\bin in System Variables and it didn't work.
I tried the below Questions but no luck.
'jmeter' is not recognized as an internal or external command, operable program or batch file
JMETER_HOME environment variable is not defined
Here is my command and error from jenkins
E:\apache-jmeter-4.0\bin\jmeter -jjmeter.save.saveservice.output_format=xml -n -t E:\JMeter Tutorial\JenkinsIntegration.jmx -l E:\JMeter Tutorial\JenkinsIntegrationResult.jtl
The easiest way of setting an environment variable is defining it under Manage Jenkins - Configure System - Global properties:
The better way would be using Environment Injector plugin
And last but not the least, you're getting this message because you're sitting at outdated JMeter 4.0, if you upgrade to i.e. JMeter 5.2.1 you won't be seeing this warning, moreover according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so in any case upgrade does make sense, check out what is the latest stable JMeter version and switch to it
I removed Jenkins and reinstalled as well as i deleted the old job and created a new job with default settings in jenkins (i dint do anything in the manage Jenkins) and it worked charm with both jmerer 4.0 and 5.3. java 1.8.0_251
with 5.3
with 4.0
as far i remember i just removed the space and added underscore in the below command from folder name JMeter Tutorial to Jmeter_Tutorial
E:\apache-jmeter-4.0\bin>E:\apache-jmeter-4.0\bin\jmeter.bat -Jjmeter.save.saveservice.output_format=xml -n -t E:\JMeter_Tutorial\JenkinsIntegration.jmx -l E:\JMeter_Tutorial\JenkinsIntegrationResult.csv

JMeter - list of installed plugins

I am using JMeter 5.2, only via Command Line Mode.
For debugging purposes I need to get a list of all currently installed plugins for the JMeter version.
How I could achieve that?
You can use plugin manager using CLI:
command-line is simple:
PluginsManagerCMD <command> [<params>]
In your case execute status
PluginsManagerCMD status

Not able to run jmeter script in non gui mode. It is recorded using blazemeter and running on jmeter 5 version

When Running the JMX script from terminal on MAC IN NON-GUI Mode, it returns an error saying "Could not open"
Below are the things i have tried :
1) jmeter -n -t "ABSOLUTE PATH.jmx" -l ABSOLUTE-PATH for results.jtl
2) Set the jmeter path and tried again.
I get the same error every time.
I don't think you can run the recording using JMeter as BlazeMeter Chrome Extension exports recorded scripts in YAML format suitable for Taurus tool
So you can run it using Taurus tool as
bzt test-Combined-JMeter-and-Selenium.yaml
If you want to convert it to "vanilla" JMeter - execute the following command:
bzt test-Combined-JMeter-and-Selenium.yaml -gui
JMeter GUI will open where you will be able to modify and save generated JMeter script as .jmx file which can be executed using JMeter.

Jmeter stops working in NON GUI mode

I am trying to post messages from JMETER into to Weblogic in non-gui mode. As soon as I execute the command
./jmeter.sh -n -t testplan.jmx -l log.jtl
Jmeter is not responding and displays the following info
Creating summariser <summary>
Created the tree successfully using JMS Point-to-Point.jmx
Starting the test # Mon Feb 13 09:51:22 GMT 2017 (1486979482989)
Waiting for possible shutdown message on port 4445.
Since I am trying to post messages to weblogic, I have also added wlfulclient.jar to lib dir of JMETER.
Both jmeter and wls are hosted on Linux servers
I have tried on 2.13 and 3.1 jmeter versions
Any hints on this issue?
Thanks
The message you display is a regular message and nothing indicates any issue occured.
Could you check the jmeter.log file for errors if any ?
And then provide more details on your test plan .
As others mentioned, what are you seeing in the jmeter.log? If you suspect that it is hanging which I doubt in your case, please launch JMeter using the following options. Launch JVISUALVM and collect thread dumps. From the thread dumps, try to figure out what the threads are doing.
java -Djsse.enableSNIExtension=false -XX:+HeapDumpOnOutOfMemoryError -Xms4g -Xmx4g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+CMSClassUnloadingEnabled -Dgroovy.use.classvalue=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.ssl=false -jar "<Jmeter install directory>\bin\ApacheJMeter.jar"

Resources