Jmeter远程运行和CSV文件

时间:2013-01-04 15:44:00

标签: linux jmeter

我有JMeter(2.8)测试,这些测试在本地运行时运行良好,在远程运行时失败 我运行这些的唯一区别是-r切换(或-R <list of machines>),所有其他参数完全相同。

测试在远程模式下失败,因为应包含CSV文件值的变量包含<EOF>值 - 这意味着测试无法加载CSV文件。

我已将CSV文件上传到每台远程计算机(as someone suggested)上JMeter的bin目录,但这没有帮助。

我正在使用Linux机器。

2 个答案:

答案 0 :(得分:4)

来自Jmeter文档:

Relative file names are resolved with respect to the path of the active test plan.
For distributed testing, the CSV file must be stored on the server host system in the 
correct relative directory to where the jmeter server is started.</b>
Absolute file names are also supported, but note that they are unlikely to work in remote 
mode, unless the remote server has the same directory structure.

另一种选择是使用变量作为CSV文件的基本文件夹,并在每个远程服务器上启动时设置它:

-Jresdir=<CSV Folder>

答案 1 :(得分:1)

原来,jmeter-server正在寻找路径“jmeter / file-from-ui.csv”的东西。通过使用strace找到了这个。

我通过在dir中添加一个jmeter文件夹解决了我的问题,我在其中启动了jmeter-server并将我的csv文件放在那里。