5

I have a satisfactory test plan, that I have been using to test with from single load generation server to our application server which reads data from a CSV file. I have been been asked to setup and start testing with a distributed system.

I setup JMeter in a Master - Slave configuration, and it successfully starts the remote system and starts execution. The problem that I am having is JMeter not able to find the data file on the remote server or that it can't read it in. I have seen similar issues before, but it was corrected by cleaning up some formatting issues. If I run the remote server in standalone mode, it reads the file and executes the test just fine. Does anybody have any suggestions or thoughts on this?

0

4 Answers 4

6

The easiest way to resolve this issue is to place the CSV file on all servers (Master and Slaves) inside the Bin directory of JMeter and don't specify any path for the CSV file inside the your JMeter test plan i.e. don't use C:\Data\Files\abc.csv in your test plan, use only abc.csv (and place this file in Bin directory). Also, it will be good to keep the test plan too in the Bin directory of the Master system JMeter.

But if you want to use the relative path like C:\Data\abc.csv, then make sure that this location exists on all the Slave systems and CSV file is present there at this location on all Slave systems. This thing may not work if your slave systems have different OS, like one slave is using Windows and another is Linux, then you should go with the first method which is the simplest and easiest one.

5
  • Thanks for the feedback... I never was never able to get having the data file in a distinct path to work successfully for the remote machines. But I moved everything to be directly under the BIN directory on both the Master and Slave Machines so everything worked fine.
    – Roy Hunter
    Commented Sep 30, 2015 at 19:34
  • But what if we maintain the data files in a github repository? how to distribute them all between all the server? does it needs to me manually uploaded, really? Commented May 29, 2016 at 17:44
  • Dhiman, I added this comment from an accidental answer. Don't know if it pings you or not... cheers!
    – corsiKa
    Commented May 31, 2016 at 4:58
  • thanks, after adding testdata into bin folder on remote machine- everything started working fine Commented Feb 14, 2018 at 9:11
  • thanks a lot. it worked. Commented Apr 29, 2021 at 19:00
2
  1. Copy CSV files to the same location on all the slave machines
  2. Use forward slashes - / as file separators no matter of operating system:

    • Linux/Unix/MacOSX /folder/anotherfolder/file.csv
    • Windows: C:/folder/anotherfolder/file.csv
  3. Do not use JMeter Variables in CSV file path

See Using CSV DATA SET CONFIG guide for more details on using dynamic data in JMeter tests.

0

I tried adding the CSV files in the /bin directory inside all slave machines, but remote start was failing. The variables where substituded as

I got it working by following steps:

  1. Place the CSV in same locations in all the slave servers
  2. Provide complete path of the CSV in the JMeter configuration eg: /home/ubuntu/file.csv
  3. Check permissions
  4. Remote start
0

Try to copy the csv file in server where you want to run jmeter and specify the path in the jmx file. and Try to ri=un jmeter by giving entire path. This worked for me ... hope it will work for you tooo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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