Is there a way to change the default path for OPEN button?
The first time I open Jmeter and clicks on 'Open file..' button,
the default path is "c:\Users\ <user_name>"
I want to change it to my "< jmeter scripts folder >" and not by changing user.dir parameter.
Dotan
As of JMeter 5.5 the "default" directory is being read from user.dir property
setCurrentDirOnJFC(existingFileName, lastJFCDirectory, System.getProperty("user.dir"));
So if you want to amend this value you need to set the user.dir property either by passing it to JMeter via -D command-line argument:
jmeter.bat -Duser.dir=c:/somefolder
or in order to make the change permanent you can add the relevant line to system.properties file (lives in "bin" folder of your JMeter installation)
user.dir=c:/somefolder
More information:
Configuring JMeter
Overriding Properties Via The Command Line
Apache JMeter Properties Customization Guide
Related
Open jmeter.bat from everything and report an error:not able to find java executable or version. please check your java installation
errorlevel=2
I started jmeter.bat from JMeter's bin directory and it started successfully. But I expect to be able to successfully launch jmeter.bat from the voidtools's Everything file search tool
Given you have "bin" directory of your JDK in your PATH environment variable you should be able to run JMeter from any 3rd-party launcher tool or shell.
You might need to restart your session after changing the PATH variable value.
If you cannot amend environment variables (i.e. you don't have enough permissions) you can add the line like:
set PATH=c:\java\bin;%PATH%
directly to jmeter.bat startup script.
More information: JMeter Installation: How to Get Started
I want to create a JMeter setenv.bat that contains environmental variables such as set JMETER_HOME=xx
I want to just type 'jmeter' anywhere on the Terminal CL in any directory to start jmeter, could this done ?
I have used a symbolic link but setenv.bat file must be a better way.
Any example would be appreciated.
In order to be able to launch JMeter from any place you need to add "bin" folder of your JMeter installation to your operating system PATH
For Windows it can be done via setx command like:
setx PATH=%PATH%;c:\jmeter\bin
replace c:\jmeter\bin with the actual path to your JMeter's bin folder.
In the same shell or after next login you will be able to type jmeter and it will run JMeter GUI.
More information: Get Started With JMeter: Installation & Tests
My performance test setup
Jmeter 5.3
1 JMX File that contains my test plan.
1 default properties file. This is named 'user.properties'.
1 custom properties file. I pass this when I run my test plan headless.
I have a test plan that I run in the following ways,
headless
jmeter -p "customProp.properties" -n -t "myTestPlan.jmx"
GUI
Open > myTestPlan.jmx and like above I want the customProp.properties also to come into effect with myTestPlan.jmx in play.
What I've done so far?
I've used the 'user.properties' attribute within the 'user.properties' file in the bin directory as follows,
user.properties=customProp.properties
I know how to do add properties files when running headless. Just now sure how to do it with GUI. Any pointers?
Just proceed as for Non GUI, but note it’s better to make -p point to jmeter.properties and -q to user.properties and your additional properties file:
jmeter -p path_to_jmeter.properties -q path_to_user.properties -q path_to_custom.properties
See:
https://jmeter.apache.org/usermanual/get-started.html#options
If you don't have any customizations under user.properties file and don't plan to have them in the future - locate the following line in the jmeter.properties file:
user.properties=user.properties
and change it to point to your "custom" properties file:
user.properties=customProp.properties
it will make the change permanent and you won't have to play with command-line arguments no matter whether you run JMeter in GUI or non-GUI modes (JMeter restart will be required to pick the properties up)
More information:
Configuring JMeter
Apache JMeter Properties Customization Guide
I'm trying to make my windows 10 to open .jmx file with jmeter GUI when I double click on it.
I' using "apache-jmeter-3.2" and currently, in order to open a jmx file I am opening the jmeter jar "\apache-jmeter-3.2\bin\ApacheJMeter.jar" and then dragging the jmx file into it.
I have tried to use the "open with" windows feature, but if i navigate to the jar location and mark "show all files" in order to see .jar extenstions and select it, it show me a windows message says "this app cannot run on your PC".
You should use jmeter-t.cmd (found in JMeter's bin folder)
drop a JMX file on this to load it in GUI mode
Associate file extension .jmx to this command to open JMeter GUI on double click JMeter file.
Use Assoc command to set file type association for JMeter .jmx scripts
Assoc .jmx=jmeter
Use FType command to define JMeter executable for the .jmx scripts
FType jmeter="c:\apps\jmeter\bin\jmeter-t.cmd" %1
That's it, you should be now able to open .jmx scripts by double clicking them on Windows. Just in case here is how to configure MacOS for automatically opening JMeter scripts
According to JMeter Best Practices you should always be using the latest version of JMeter so consider migrating to JMeter 5.0 (or whatever is the current version available at JMeter Downloads page)
I installed jmeter with brew and built a test plan which I hoped to be able to run on a distributed set of nodes. But I cannot find where the jmeter.properties file is in order to tell my local client where to look for the helper nodes. Any ideas? I tried adding it manually, but it did not take.
The /usr/local/Cellar/jmeter/5.0/bin folder only contains jmeter and jmeter.log
Thanks!
Looking into JMeter formula my expectation is that you should see jmeter.properties file under /usr/local/Cellar/jmeter/5.0/libexec/bin/ folder (this is applicable for JMeter 5.0, for other versions location should be different)
PS1. You can install JMeter without using Homebrew, if you execute the following commands:
cd ~
wget https://www-eu.apache.org/dist//jmeter/binaries/apache-jmeter-5.0.tgz
tar xf apache-jmeter-5.0.tgz
then you will have "normal" JMeter installation as apache-jmeter-5.0 in your home folder
PS2. According to JMeter Best Practices you should be rather using user.properties than jmeter.properties so consider placing your configuration into /usr/local/Cellar/jmeter/5.0/libexec/bin/user.properties file instead
PS3. You can also pass any JMeter property via -J command-line argument so you can do something like
jmeter -JpropertyName=propertyValue
i.e.
jmeter -Jremote.hosts=10.10.10.1,10.10.10.2 -n -t test.jmx -l result.jtl
It's also not in my /usr/local/Cellar/jmeter/5.0/bin folder.
However, if your intention is simply to have jmeter load your user.properties file, then
create a user.properties file inside
/usr/local/Cellar/jmeter/5.0/bin
then execute jmeter by running $ /usr/local/Cellar/jmeter/5.0/bin/jmeter
The user.properties file would be loaded by jmeter.