I am doing Distributing Load testing by j meter but when i run the test case from remote host then it shows 100% error. My system is running as a master and the remote system or the slave system which is connected properly and run their threads too but with 100 % error. It gives me 100% error in both the cases. How to handle it to test load and performance testing on the API. Suggest some answers to get progress.
I tested my apis on different conditions but still facing same issue.
Make sure both master and slave are running the same Java version. If they are different - download and install the appropriate one
Make sure both master and slave running the same JMeter version. If they are different - download and install the latest JMeter version
Make sure both master and slave have the same extensions and/or plugins installed as if you have test plan which relies on a plugin which is not present on the slave - the execution will fail. Use JMeter Plugins Manager to synchronize extensions or alternatively just copy over master JMeter instance to the slave machine
If your test relies on external data (CSV files, property files, files used for uploading, etc.) - make sure to copy them to the slave as well.
In case of any problems check jmeter-server.log file on the slave machine for any suspicious entries
Just in case check out the following material:
Remote Testing
How to Perform Distributed Testing in JMeter
JMeter Distributed Testing Step-by-step
Related
Im running Jmeter test with one master machine and slave system. The issue is Im not getting the results from the slave system, even though I could see the test has started and finished in slave system.
I tried running another Jmeter test with a different script & same configuration and fortunately Im able to get the results from the slave system.
Im not able to understand why the first scenario is not working and where exactly is the issue. Kindly help me out.
From your screenshots I can only state that the test didn't produce a single SampleResult because it didn't execute any Sampler, the most common reasons are:
Your test is using CSV Data Set Config and you forgot to copy the CSV file on slave machines. JMeter master only transfers the .jmx test plan to slaves, everything else needs to be copied manually
Basically a subset of point 1: your test plan relies on a JMeter Plugin which is not present on the slaves. If this is the case - install the missing plugin(s) using the JMeter Plugins Manager
The exact failure reason can be found in jmeter.log file on master machine and jmeter-server.log files on slave machines.
I have connect my PC as master to other PCs and I run the distributed test but all I get is an empty jtl file with only the headers of a table..
What is the problem?
We don't know.
From your beautiful screenshot we can only see that 0 samplers were executed which perfectly explains empty results.
Check jmeter.log file for jmeter master and slave, most probably you will find the reason there.
The most common reasons are:
Incorrect RMI configuration so there is no bi-directional communication between the master and slaves
Your test relies on external data, i.e. uses CSV Data Set Config and you forgot to copy the CSV file(s) to slave machine(s)
Your test relies on JMeter Plugins and you forgot to install JMeter Plugins on the slave machine(s), you can install JMeter Plugins Manager and open the .jmx test plan on the slave - the plugins manager should detect and install at least the majority of the plugins used in the script
I am trying to do a POC with JMeter master on my Windows laptop and slave on one of the remote machines which is Linux based. Is this feasible? If yes, where should the JMeter directory be copied? Root or somewhere else?
If this is not possible and assuming I manage to get two linux machines (one master and one slave), the main question remains - where should the JMeter directory be placed?
Any pointers will be appreciated.
Thanks
Basically Jmeter's master-slave connection is build based on RMI and it is only possible if two of them on the same subnet. However there are several techniques to make it possible, one of them is tunneling.
It should be okayish given your test is operating-system-agnostic, i.e. you use relative paths, dynamic file/line separators, etc.
JMeter master machine is only responsible for:
Sending the .jmx test script to the slaves
Starting the test execution
Collecting results from them
Just remember to:
Use the same Java version
Use the same JMeter version
Make sure that all plugins are installed on the slaves if your test relies on the plugins
Make sure to copy all dependent files (extra .jar files, CSV files, properties, etc.)
With regards to the JMeter placement on Linux - it's totally up to you, just make sure that your Linux user has read/write/execute permissions on that folder, normally I would go for /opt or /usr/local folders and would rather not install JMeter into the root of the file system.
More information: How to Perform Distributed Testing in JMeter
About JMeter Distributed configuration for load testing (not in cloud),
I can setup X JMeter masters in different machines and execute them with shared files using shared folder(s).
The benefits are:
Each master is oblivious to other and can be shutdown and start when needed with dynamic/different properties.
Each master have its own logs and results that can be explored separately.
I don't need network connection between JMeter masters' machines.
What are the benefits for using master-slave configuration in such case? It seems like an unnecessary overhead when focusing on load test.
The benefits are:
centralization of results on 1 node (master), you can follow results in Summarizer from the master node, you have the CSV/XML file generated there and you can generate the web report at end of test using this
centralization of jmx plan on 1 node (master)
synchronization of the test from master, ie the master will start/stop the test from master
Besides the drawbacks you describe there are:
- network configuration complexity
- need to deploy csv on each node (although there are options with plugins (redis, simple table server)
- network traffic between nodes and master
It was created at time deployment automation was not available through things like vagrant, ansible, cloud ...
I was using non-GUI option to perform a distributed load testing with Jmeter from master server A (Linux) to slave server B (Linux). Here's what I did:
./jmeter -n -t xxx.jmx -l results.log -R xxx.xxx.xxx.xxx
By default, Jmeter will write the results file to the master server A. I'm wondering if there's a way to directly store the results file on remote server B.
Thanks in advance!
The idea is they are dumb slaves, possibly without even the means to store data locally. The methods are invoked on a remote processor (RMI) and run from there, but all other resources are kept at the client side.
You could set up a CI server like Jenkins to run jmeter clients in a distributed manner. That will allow you more control over how tests are distributed. I have a jenkins set up that runs jmeter client on a master, with distributed tests to remote (jmeter) slaves, which are also jenkins slaves, tied to jobs that control the workspaces. This means they are never used by jenkins, but jenkins can get results files out of the workspace, aggregate them, and produce graphs using jmeter plugins CMDrunner.
The other possibility is to prefix your sample results with the unique part of the IP address of the current slave. This will allow you to display them aggregated or separately in your results viewer, and potentially write scripts to separate the results out and store them back on the slave they came from.
You could also use samba or similar to share the remote slave drive, and store the results directly there from the master.
If you have only one slave, any of these would be easy to implement, but get more complex as you add more slaves.
Look at sample sender alternative implementations.
Read the concerned paragraph here:
http://jmeter.apache.org/usermanual/remote-test.html
Natively it works like this, an option is not to use distributed mode and run many jmeter instances in non gui mode.
Try jmeter user mailing list and if you don't get an answer maybe open a bugzilla enhancement request.
If you want to build distributed load testing system you can try use Jagger