jMeter java.lang.IllegalArgumentException:文件example.csv必须存在并且可读 [英] jMeter java.lang.IllegalArgumentException: File example.csv must exist and be readable

查看:1081
本文介绍了jMeter java.lang.IllegalArgumentException:文件example.csv必须存在并且可读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将jMeter 2.9更新为3.2,并且旧测试用例存在问题.当我使用jMeter 2.9打开.jmx文件时,所有测试都运行顺利,但是从同一位置使用3.2版时,我会收到一条消息:文件jmeter-results.xml已经存在,您想做什么?附加到现有文件-不开始-覆盖现有文件. 不管我选择什么,都行不通.

I updated jMeter 2.9 to 3.2 and having issues with old test cases. When I open .jmx file with jMeter 2.9 all tests runs smoothly, but when using version 3.2 from same location I get a message: The file jmeter-results.xml already exists, what do you want to do? Append to existing file - Don't start - Overwrite existing file. Doesn't matter what I choose, it doesn't work.

日志文件:

2017-07-28 11:55:20,458 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-07-28 11:55:20,458 INFO o.a.j.s.SampleEvent: List of sample_variables: 
[]
2017-07-28 11:55:20,474 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, 
*local*)
2017-07-28 11:55:20,567 INFO o.a.j.e.StandardJMeterEngine: Starting 
ThreadGroup: 1 : JMeter Users
2017-07-28 11:55:20,567 INFO o.a.j.e.StandardJMeterEngine: Starting 1 
threads for group JMeter Users.
2017-07-28 11:55:20,567 INFO o.a.j.e.StandardJMeterEngine: Thread will 
continue on error
2017-07-28 11:55:20,567 INFO o.a.j.t.ThreadGroup: Starting thread group... 
number=1 threads=1 ramp-up=5 perThread=5000.0 delayedStart=false
2017-07-28 11:55:20,567 INFO o.a.j.t.ThreadGroup: Started thread group 
number 1
2017-07-28 11:55:20,567 INFO o.a.j.e.StandardJMeterEngine: All thread groups 
have been started
2017-07-28 11:55:20,583 INFO o.a.j.t.JMeterThread: Thread started: JMeter 
Users 1-1
2017-07-28 11:55:20,583 INFO o.a.j.s.FileServer: Stored: testdata/test.csv
2017-07-28 11:55:20,583 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.IllegalArgumentException: File test.csv must exist and be readable
at org.apache.jmeter.services.FileServer.createBufferedReader(FileServer.java:430) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.services.FileServer.getReader(FileServer.java:396) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.services.FileServer.getParsedLine(FileServer.java:378) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:200) ~[ApacheJMeter_components.jar:3.2 r1790748]
at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:393) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:385) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.control.GenericController.next(GenericController.java:158) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.control.LoopController.next(LoopController.java:123) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:87) ~[ApacheJMeter_core.jar:3.2 r1790748]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:252) [ApacheJMeter_core.jar:3.2 r1790748]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_141]
2017-07-28 11:55:20,583 INFO o.a.j.t.JMeterThread: Thread finished: JMeter 
Users 1-1
2017-07-28 11:55:20,583 INFO o.a.j.e.StandardJMeterEngine: Notifying test 
listeners of end of test
2017-07-28 11:55:20,583 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, 
*local*)

推荐答案

  1. 如果您正在谈论此警告:

  1. If you are talking about this warning:

它是 JMeter 3.2 中引入的增强功能问题58164 .只需从测试计划中删除所有听众,警告就会消失.实际上,您不需要任何监听器,因为它们会增加开销可能会破坏您的测试,请考虑使用

it is enhancement introduced in JMeter 3.2 within the bounds of issue 58164. Just remove all the listeners from your Test Plan and the warning will go away. Actually you don't need to have any listeners as they create overhead and may ruin your test, consider storing your test result to .jtl result file using -l command-line argument instead.

查看此行:

2017-07-30 14:29:57,918信息o.a.j.s.FileServer:存储: testdata/test.csv

您只是忘了将您的test.csv文件复制到新的JMeter安装中

you simply forgot to copy your test.csv file to new JMeter installation

  • 转到JMeter 3.2"bin"文件夹
  • 在其中创建文件夹testdata
  • 将您的test.csv文件复制到testdata文件夹中
  • Go to the JMeter 3.2 "bin" folder
  • Create folder testdata there
  • Copy your test.csv file into the testdata folder

或仅使用test.csv文件的绝对路径.

Or just use the absolute path to your test.csv file.

这篇关于jMeter java.lang.IllegalArgumentException:文件example.csv必须存在并且可读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆