Bug 64298 - Cannot read csv file when executing script on command line after referencing csv file with relative path in csv data set
Summary: Cannot read csv file when executing script on command line after referencing ...
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 5.1.1
Hardware: PC All
: P2 normal (vote)
Target Milestone: JMETER_5.3.0
Assignee: JMeter issues mailing list
Depends on:
Reported: 2020-04-01 13:05 UTC by TonyChen
Modified: 2020-04-27 11:50 UTC (History)
1 user (show)

命令行方式执行时的日志 (175.87 KB, image/jpeg)
2020-04-01 13:05 UTC, TonyChen

Note You need to log in before you can comment on or make changes to this bug.
Description TonyChen 2020-04-01 13:05:07 UTC
Created attachment 37141 [details]

我有一个csv文件ENVname.csv其中有一条数据,我在一个测试计划cms.jmx中添加了csv data set插件,在插件中以相对路径的方式引用./ENVname.csv,我在一个HTTP请求插件中引用该csv中的变量名。之后我将cms.jmx和ENVname.csv两个文件放到一个$JMETER_HOME/script目录下,然后在script目录下打开终端,通过执行命令../bin/jmeter -n -t cms.jmx -l result.jtl -e -o ./report -R,命令执行完之后,我检查result.jtl文件,发现没有HTTP请求执行的记录,我的远程服务的数据库中也没有创建五条数据。我再打开jmeter客户端,通过客户端打开cms.jmx文件,在客户端上直接执行该脚本,之后数据库成功添加了一条数据。我在jmeter官方网站在没有找到相关的解决方案,请告诉我应该怎样解决这个问题?我的操作系统是Mac OS X10.14.6,使用oracle jdk 1.8.0_231版本
Comment 1 Philippe Mouawad 2020-04-27 11:50:00 UTC
I have a csv file ENVname.csv with a piece of data in it. I added a csv data set plugin to a test plan cms.jmx, which references ./ENVname.csv as a relative path in the plugin. I am requesting a plugin in an HTTP Reference the variable name in the csv. After that, I put the two files cms.jmx and ENVname.csv into a $ JMETER_HOME / script directory, and then open the terminal in the script directory, by executing the command ../ bin / jmeter -n -t cms.jmx -l result .jtl -e -o ./report -R After the command was executed, I checked the result.jtl file and found that there was no record of HTTP request execution, and no five pieces of data were created in my remote service database. I then open the jmeter client, open the cms.jmx file through the client, execute the script directly on the client, and then the database successfully adds a piece of data. I did not find a solution on the official website of jmeter. Please tell me how to solve this problem? My operating system is Mac OS X 10.14.6, using oracle jdk 1.8.0_231 version
Comment 2 Philippe Mouawad 2020-04-27 11:50:19 UTC
Can you attach jmeter.log file