0

I have few questions over JMeter-distributed testing,

  1. Should network configuration be same for the server where application resides and my server where I am running distributed JMeter tests?
  2. I have 1 master and 2 slaves, how to see which thread is running on which slave?
1

1) Should network configuration be same for the server where application resides and my server where I am running distributed JMeter tests?

No. Not Really. Your application may be running on Linux and you can be executing your JMeter test scripts from a windows system. You don't require any server like APACHE or TOMCAT to execute your tests but you do require one to host your application. So the system on which your are executing tests need not have same configurations as your target system.

You do require that in a distributed testing environment all your master and slave systems are running on the same O.S. This has something to do with JMeter's internal configuration for communication.

If your target system(server) is not your live system but rather a test server where you test your applications before shipping them live, then it would be really good if the test server configuration is the same as that of the live server. You can only may the test environment as similar to the live environment as possible so that you can testin a close to actual scenario/condition.

2) I have 1 master and 2 slaves, how to see which thread is running on which slave?

What you can do here is, add a listener to your test plan and configure it to write results to a file. Now when you execute your test script, it should be generating 2 result files. If the result file has not be created on the Master system itself, you might need to get it from the Slave system. Now open that result file in any listener to study the results for that slave.

OR

You can also try giving a dynamic name to the thread group. You can try and add the dynamic group name like below

${__machineName()}_<custom thread group name here>

${__machineName()} should add the name of the Slave system in the thread name displaying in the results in your Listener.

Alternatively you can also use ${__machineIP()}

Eg., In the Summary Report Listener select the "Include group name in label?" option before the "Save Table Data" button at the bottom of "Summary Report Listener" window and run the test script.

  • 1) I am not asking about OS , its all about network configuration of server which hosts an application and another server where i ran my Jmeter script – sameer joshi Aug 19 '16 at 7:28
  • I have answered that first and then I have explained that the master and slave systems need to have same platforms! Network configuration for the system from which you will execute your script need not be same as the server hosting your application. – IAmMilinPatel Aug 19 '16 at 7:47
0
  1. Your server should have either production or production-like network configuration. As long as JMeter slave machines can reach it - it is fine.
  2. If you have defined i.e. 100 threads in test plan both slaves will kick off 100 threads so you will have 200 virtual users in total. If you still looking to get information regarding which thread is being executed you can use __log() and __threadNum() functions combination like:

    ${__log(Running thread # ${__threadNum},,,)}
    

    The relevant messages will be printed to jmeter.log file:

    Log and ThreadNum

    See How to Use JMeter Functions posts series for comprehensive information on above and other JMeter functions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.