Я тестирую бэкэнд-приложение, использующее технологии NodeJS и Java.связь: WebSocket в части NodeJ и HTTP в части Java) в JMeter Я должен параметризировать URL-адрес, чтобы переключаться между URL-адресом разработки, продукцией и препод.
Я сделал это с помощью файла CSV.Я создал папку CSV, в папке, где у меня есть Jmeter 5.0.Я готовлю 3 CSV-файла У меня есть три CSV-файла в папке bin в Jmeter, таких как: development.csv, production.csv.и prepod.csv
Мои файлы CSV следующие:
протокол, узел http, 10.219.227.66 ws, протокол 10.219.227.66
, узел https, prepod.myprepod.io ws, prepod.myprepod.io
протокол, хост https, production.myproduction.io ws, production.myproduction.io
, и я установил в Jmeter: URL-адрес сервера открытого соединения WebSocket -ws Имя сервера или IP - $ {host}
Конфигурация набора данных CSV $ {__ P (среда, разработка)}. csv
, и этот проект не запускается в журнале, который я имею: Причина:
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)
2018-10-19 14:29:30,726 INFO o.a.j.t.JMeterThread: Thread started: Authorize success 1-1 2018-10-19 14:29:30,727 INFO o.a.j.s.FileServer: Stored: jmeter/5.0/bin/development.csv 2018-10-19 14:29:30,727 ERROR o.a.j.t.JMeterThread: Test failed! java.lang.IllegalArgumentException: Could not read file header line for file jmeter/5.0/bin/development.csv
2018-10-19 14:28:17,339 INFO o.a.j.s.FileServer: Stored: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:28:21,184 INFO o.a.j.g.a.Start: Stopping test
2018-10-19 14:28:21,223 INFO o.a.j.t.JMeterThread: Stopping: Authorize success 1-1
2018-10-19 14:28:21,223 INFO o.a.j.t.JMeterThread: Thread finished: Authorize success 1-1
2018-10-19 14:28:21,225 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2018-10-19 14:28:21,225 INFO o.a.j.s.FileServer: Close: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:28:21,225 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
2018-10-19 14:28:26,413 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2018-10-19 14:28:26,413 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-10-19 14:28:26,414 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2018-10-19 14:28:26,695 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Authorize success
2018-10-19 14:28:26,695 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Authorize success.
2018-10-19 14:28:26,695 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2018-10-19 14:28:26,695 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2018-10-19 14:28:26,696 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2018-10-19 14:28:26,696 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2018-10-19 14:28:26,697 INFO o.a.j.t.JMeterThread: Thread started: Authorize success 1-1
2018-10-19 14:28:26,697 INFO o.a.j.s.FileServer: Stored: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:28:30,510 INFO o.a.j.g.a.Start: Stopping test
2018-10-19 14:28:30,540 INFO o.a.j.t.JMeterThread: Stopping: Authorize success 1-1
2018-10-19 14:28:30,540 INFO o.a.j.t.JMeterThread: Thread finished: Authorize success 1-1
2018-10-19 14:28:30,541 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2018-10-19 14:28:30,541 INFO o.a.j.s.FileServer: Close: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:28:30,542 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
2018-10-19 14:28:34,204 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2018-10-19 14:28:34,204 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-10-19 14:28:34,205 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2018-10-19 14:28:34,503 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Authorize success
2018-10-19 14:28:34,504 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Authorize success.
2018-10-19 14:28:34,504 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2018-10-19 14:28:34,504 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2018-10-19 14:28:34,504 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2018-10-19 14:28:34,505 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2018-10-19 14:28:34,505 INFO o.a.j.t.JMeterThread: Thread started: Authorize success 1-1
2018-10-19 14:28:34,505 INFO o.a.j.s.FileServer: Stored: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:29:25,998 INFO o.a.j.g.a.Start: Shutting test down
2018-10-19 14:29:26,021 INFO o.a.j.t.JMeterThread: Thread finished: Authorize success 1-1
2018-10-19 14:29:26,021 INFO o.a.j.t.JMeterThread: Stopping: Authorize success 1-1
2018-10-19 14:29:26,022 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2018-10-19 14:29:26,022 INFO o.a.j.s.FileServer: Close: /usr/local/Cellar/jmeter/5.0/bin/development.csv
2018-10-19 14:29:26,022 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
2018-10-19 14:29:30,475 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2018-10-19 14:29:30,475 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-10-19 14:29:30,476 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2018-10-19 14:29:30,724 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Authorize success
2018-10-19 14:29:30,724 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Authorize success.
2018-10-19 14:29:30,724 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2018-10-19 14:29:30,724 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2018-10-19 14:29:30,725 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2018-10-19 14:29:30,726 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2018-10-19 14:29:30,726 INFO o.a.j.t.JMeterThread: Thread started: Authorize success 1-1
2018-10-19 14:29:30,727 INFO o.a.j.s.FileServer: Stored: jmeter/5.0/bin/development.csv
2018-10-19 14:29:30,727 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.IllegalArgumentException: Could not read file header line for file jmeter/5.0/bin/development.csv
at org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:283) ~[ApacheJMeter_core.jar:5.0 r1840935]
at org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:183) ~[ApacheJMeter_components.jar:5.0 r1840935]
at
что не так, как мне это улучшить?пожалуйста, помогите мне