1
votes

I am testing backend application, which is in NodeJS and Java technology.

The communication protocols are:

  • WebSocket in NodeJs part
  • and HTTP in Java part)

In JMeter, I must parameterize URL, to switch between development URL, production and preproduction.

I did it using CSV file.

I created a folder containing CSVs, in the folder where I have JMeter 5.0.

I prepare 3 CSV files.

I have three csv file in folder bin in Jmeter such as:

  • development.csv,
  • production.csv.
  • prepod.csv

My CSV files are following:

protocol,   host
http,   10.219.227.66
ws, 10.219.227.66

protocol,   host        
https,  prepod.myprepod.io
ws, prepod.myprepod.io

protocol,   host        
https,  production.myproduction.io
ws, production.myproduction.io

and I have set in JMeter: WebSocket Open Connection Serwer URL – ws Server name or IP - ${host}

CSV Data Set Config
${__P(environment,development)}.csv

and this project doesn't work, in log I have:

Caused by: java.lang.IllegalArgumentException: File development.csv must exist and be readable at org.apache.jmeter.services.FileServer.createBufferedReader(FileServer.java:424) ~[ApacheJMeter_core.jar:5.0 r1840935] at org.apache.jmeter.services.FileServer.readLine(FileServer.java:340) ~[ApacheJMeter_core.jar:5.0 r1840935] at org.apache.jmeter.services.FileServer.readLine(FileServer.java:324) ~[ApacheJMeter_core.jar:5.0 r1840935] at org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:272) ~[ApacheJMeter_core.jar:5.0 r1840935] ... 8 more 2018-10-19 14:29:30,727 INFO o.a.j.t.JMeterThread: Thread finished: Authorize success 1-1 2018-10-19 14:29:30,728 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2018-10-19 14:29:30,728 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, local)

What is wrong ?

1

1 Answers

0
votes

As per message:

java.lang.IllegalArgumentException: File development.csv must exist and be readable at ...

It seems the test is using the default value "development" , so JMeter looks for development.csv

So I guess you're facing this in another environment, in this case you should run jmeter with this additional parameter:

-Jenvironment=production