Jmeter执行错误显示,即jmeter.threads.JMeterThread:测试失败! java.lang.IllegalArgumentException:Filename不能为null或为空

时间:2016-12-06 14:12:10

标签: jmeter

我正在尝试执行测试脚本并显示以下错误。任何帮助将不胜感激。

ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: Filename must not be null or empty

总错误代码为:

2016/12/06 19:05:13 INFO  - jmeter.engine.StandardJMeterEngine: Running the test! 
2016/12/06 19:05:13 INFO  - jmeter.samplers.SampleEvent: List of sample_variables: [] 
2016/12/06 19:05:13 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) 
2016/12/06 19:05:14 INFO  - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : www.cebsworldwide.com 
2016/12/06 19:05:14 INFO  - jmeter.engine.StandardJMeterEngine: Starting 5 threads for group www.cebsworldwide.com. 
2016/12/06 19:05:14 INFO  - jmeter.engine.StandardJMeterEngine: Thread will continue on error 
2016/12/06 19:05:14 INFO  - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 5 ramp-up 1 perThread 200.0 delayedStart=false 
2016/12/06 19:05:14 INFO  - jmeter.threads.JMeterThread: Thread started: www.cebsworldwide.com 1-1 
2016/12/06 19:05:14 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: Filename must not be null or empty
    at org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:262)
    at org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:178)
    at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:405)
    at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:397)
    at org.apache.jmeter.control.GenericController.next(GenericController.java:158)
    at org.apache.jmeter.control.LoopController.next(LoopController.java:123)
    at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:87)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
    at java.lang.Thread.run(Unknown Source)

1 个答案:

答案 0 :(得分:1)

当您向测试计划添加CSV Data Set Config并离开"文件名"输入空白:

CSV Data Set Config error

  • 如果您没有使用CSV数据集配置进行参数化 - 只需删除或禁用它,错误就会消失
  • 如果您计划在脚本中使用CSV文件中的数据 - 您需要提供CSV文件的相对或更好的绝对路径,并根据您的需要配置其他参数。有关综合信息,请参阅Using CSV DATA SET CONFIG文章。