首页 > 解决方案 > JMeter distributed testing from Java code - csv dependent data in slaves

问题描述

I am running JMETER DISTRIBUTED test from my JAVA CODE. So far , it is working fine for the JMX files that doesn't have any dependent CSV test data. Now , I'd like to run a test with csv dependent data but it seems the csv file needs to be placed in the SLAVE machines as well. Is there a way we could execute the test without placing the dependent CSV file in SLAVE machines. I am trying to automate the tests through java code , so it would not be feasible for me to manually place the csv files in SLAVE machines. Please let me know your suggestions on this.

标签: javacsvjmeterslavedistributed-testing

解决方案


从当前的JMeter 版本 5.4.1开始,不支持将依赖文件传输到从机,只有 .jmx 脚本通过网络从主机传递。

您可以考虑使用HTTP Simple Table ServerRedis Dataset之类的插件,或者将测试数据放入数据库并使用JDBC 测试元素从集中式远程存储中获取数据,而不是依赖本地 CSV 文件。

或者,您可以使用jCIFSjSch库将 .CSV 文件从您的 JAVA CODE 复制到从站


推荐阅读