Distributed JMeter tests with per-slave CSV datasets - jmeter

I'd like to run a distrubuted JMeter test on our site, following the
manual. My tests are parametrized via a CSV DataSet configuration element to simulate diffent users. The question is now: Will JMeter use the same DataSet for each slave, or can I somehow configure each slave with its own dataset? If the first is the case, slaves will steal each other's session which is of course undesired.

Jmeter use local CSV fiels in distributed mode. So you just place different files on each slave and it works. Nothing special to do.

You can choose the CSV Data behaviour with the Sharing mode option. Description of each option detailed in:
http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config

Related

Saving the jmeter result .jtl files in the Slaves machine

I have configured Jmeter distributed testing, and I'm successfully able to trigger the test from Master to Slave machine. But the results files are not being generated on Slave machine even if I explicitly added a Listener into the test plan.
Can anybody help on this.
Thanks in advance
Question answered in JMeter group by #glinius:
in user.properties, add: mode=StrippedBatch
This will:
remove some data from the SampleResults as the response body, but do you need response body during a High Load Test, NO, DEFINITELY NO !
will send Sample Results as Batches and not for every sample reducing CPU, IO and network roundtrips
Adding the listener itself is not sufficient, you need to specify the location for the .jtl file in the listener, i.e. Simple Data Writer is a good choice
The user which is running the JMeter slave process must have write permissions to the folder specified. See How to Save Response Data in JMeter article for more details if needed. If you want to save the response data - make sure to provide mode=Standard property
Also make sure to provide the valid resultcollector.action_if_file_exists property, i.e. APPEND if you want to add new results to the existing file or DELETE if you want to overwrite the old results with the new ones.
The property can be passed via -G command-line argument from the master or via -J command-line argument from the slave. More information: Full list of command-line options

Jmeter: how to modify properties on the fly while distributed test is running?

WHAT I HAVE:
Huge Jmeter agents network, 1 master + many slaves.
Master sends tasks to Slaves, they start test execution and report data to Master.
WHAT I WANT:
Be able to modify inputs (passed as global properties to Master, -G) on the fly, while test is executed, without necessity to stop/restart test.
WHAT I KNOW:
I can use BeanShell server to modify Jmeter properties while running the test. It works fine. But BeanShell server starts only on Master, not on Slaves.
Master sends -G properties to Slaves only once, before test execution. Even if Master properties are updated, slaves never get this information until test is restarted.
QUESTION:
How can I modify properties on Slaves as well? Is there any proper solution?
WHAT I THOUGHT ABOUT:
Well, I can do the same trick with BeanShell server for every Slave node too. But this solution doesn't look really ideal for me as I have a lot of agents and have to update all of them. It takes time.
I can change my test logic to update properties from file periodically, and then modify files on Slaves on the fly. Looks even easier for me than #1 as it's cheaper to modify a file over ssh remotely then to launch a separate server on every node.
Actually, all I need in fact is to write a proper method/function for BeanShell server that not only changes properties locally but informs Slaves about it. I'm not so familiar with Jmeter source code yet (just started) but know that it's already implemented inside the code as a part of remote launching procedure. So, if you can point me to the right class to take a look into - it can help me a lot.
Any ideas appreciated. Thanks in advance.
You can add to your Test Plan Property File Reader which will read and update properties in Slaves, you can add properties on runtime in Master using Beanshell/JSR233 element.

JMeter - saving results to both CSV and XML

What I try to achieve is to get JMeter results in 2 formats, for the same test execution. CSV is the one I'm mostly interested in, unless there are failures - then I may need to use data which can be saved only to XML. I can't use XML for most occasions, due to misc reasons.
I was looking at jmeter.save.saveservice.output_format cfg entry, it doesn't seem to accept both as valid entry. I was also looking at JMeter code itself, it also clearly separates both options.
Did anyone invent a hack to get both JMeter outputs at the same time?
Solution for both standalone JMeter and jmeter-maven-plugin is welcome.
If you use JMeter Maven plugin, as per Five Ways To Launch a JMeter Test without Using the JMeter GUI guide the default output has to be XML.
If you need CSV output as well - just add Simple Data Writer listener. If you looking for CSV data to be in line with JMeter default CSV values configure it as follows:

Is it possible to reuse created jmeter test plan for another test environment?

I have recorded a jmeter script for wiki page. That record was done in one of our test environment. That script is working fine and now i want to perform same load test for another test environment(Both environments are same, only urls are different).Is it possible to reuse?How can i do it?
I have added HTTP Request default element at the begging of test plan creation. Now recorded script consist of many HTTP Request element. Each request element contains Server IP of test instance.
Extract IPs and other env-specific data to .properties file:
http://jmeter.apache.org/usermanual/get-started.html#options
Read them in your JMeter with JMeter built-in function ${__P(someName)} as you see fit
Run your generic JMeter test with env-specific config data in .properties file
Yes. It is possible to run the same test in multiple environments. It all depends on how you design your test plan.
This site has exact details you are looking for.
http://www.testautomationguru.com/jmeter-manage-test-plan/

Fetch response times in JMeter running remotely

Ok so I set up my JMeter to run remotely using one slave computer (possibly more to come), and it's working out for the most part EXCEPT that I can't fetch the response time over time-graphs function using the JMeter plugin. I'm still able to use the "PerfMon Metrics" tool to get the CPU/Memory values from the slave computer, so I don't understand how I'm not able to get the response time results.
Does anyone have any experience using that function?
I would check the master- slave configuration: be sure that
the same Jmeter release is used
same directory tree structure is used
Jmeter-plugins are installed on both systems
...
If you use a standard "Summary report" listener, and save data to a file in the master, then you can reload and analyse the data off line with any listener.
HTH

Resources