Jmeter no longer loads txt file from directory - jmeter

I have Jmeter installed with homebrew. I have a text plan that has been working fine and which I saved before rebooting. Upon rebooting my machine and reloading the test plan, I keep getting "File not found exceptions" even though everything is in the same location and nothing about the test plan has changed.
How do I make jmeter go to a specific directory and look for a file? Help.

Your text file should be in the same directory from where you have launched your JMeter.

Given you installed via Homebrew JMeter's working directory depends on where you launch JMeter from. You can check it in i.e. jmeter.log file
2016/05/09 06:40:50 INFO - jmeter.JMeter: user.dir =/private/tmp
2016/05/09 06:40:50 INFO - jmeter.JMeter: PWD =/private/tmp
So you have 3 options:
Start Jmeter from the folder where files live
Move files to the folder where JMeter is running from now
The best one: use full paths instead of relative. Actually this is what is recommended in Performance testing: Upload and Download Scenarios with Apache JMeter article.

Related

Open jmeter.bat from everything and report an error

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

Where to place Jmeter test and resource files on remote server?

I have set up Jmeter on a server for remote testing but I, however, do not know how/where to configure jmeter-server to look for the .jmx file constituting my test plan.
I have replaced the file paths tothe resource file (i.e. the various CSV files I referenced locally) in the jmx file.
I'm working with Jmeter version 5.4.1 and also used this guide in setting up the server.
The .jmx script is being transferred automatically from the master to the slave machine(s), you don't need to worry about it. The only thing to remember is that if you're using any JMeter Plugins - you need to install them on the slave machine(s)
If you use relative paths to CSV files - on the slave they will be relative to the folder where you launch jmeter-server script from. Normally people launch JMeter from "bin" folder so it makes sense to use file paths relative to JMeter's "bin" folder.
Another approach is to use "central" location for the test data like Redis Data Set or HTTP Simple Table Server, this way you won't have to copy the test data to the slaves.

Running "create-rmi-keystore.bat" file in Jmeter bin folder not working

I'm trying to set up distributed test in Jmeter however whenever I tried to run the "create-rmi-keystore.bat" file in bin folder doesn't seem to work.. It's not opening...Can someone enlighten me what should be the problem and solution.
Nobody can "enlighten" you about the solution unless you run this command in the terminal and share the output with us, the possible reasons are:
You already have rmi_keystore.jks file in the "bin" folder of your JMeter installation
You don't have keytool program in your operating system PATH
I also believe that 99.99999% of users don't need secure communication between JMeter master and slaves as it doesn't add any value and just consuming valuable resources, so I tend to disable secure RMI communication when I run JMeter tests in distributed mode.
Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)
server.rmi.ssl.disable=true
Restart JMeter to pick the property up
Repeat it for all machines which are involved in distributed test
That's it, you don't need this rmi-keystore.jks anymore
References:
Remote hosts and RMI configuration
JMeter Distributed Testing with Docker
Remote Testing
On Unix system use create-rmi-keystore.sh script instead
for Windows systems (called bin/create-rmi-keystore.bat) and Unix like systems (called bin/create-rmi-keystore.sh)
$ ./create-rmi-keystore.sh

java.Nullpointer when read csv file performance test jmeter

I have issue, which is relate to read csv file. When i run jmx file with gui, everything is ok, but when run with non-gui always show error java.lang.Nullpointer exception.
Does anyone know how to fix it?
Have you tried to "See the log file for details"? The file is called jmeter.log and it's being generated in "bin" folder of your JMeter installation or in the folder where you launch JMeter from (if it differs from the above)
You can try troubleshooting the issue yourself by comparing JMeter log files from GUI and from non-GUI execution. Another suggestion is using full path to the CSV file instead of the relative one.
References:
JMeter Hints and Tips: Enabling debug logging
How to Configure JMeter Logging

No jmeter.properties file when installed with brew?

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.

Resources