将文件夹中的所有jar添加到jmeter类路径

RaG*_*aGe 3 classpath jmeter

I have a CI server dumping several application jars and their various dependencies in a single folder. I'm trying to then run a jmeter test with all the jars in jmeter's classpath.

I can set jmeter's user.classpath property to a (semi-)colon separated list of individual jars, but using a wild card doesn't seem to be supported. Is there a way I can add the entire folder worth of jars to jmeter's classpath?

Dmi*_*i T 6

按照如何将JUnit与JMeter一起使用指南:

您也可以通过“ user.classpath”属性“告诉” JMeter查找其他位置。该属性位于JMeter安装的/ bin文件夹下的“ user.properties”文件中。它可以采用以下值:

  • 单个jar文件:user.classpath = / Projects / junit / test1.jar
  • 多个jar文件:user.classpath = / Projects / junit / test1.jar; /Projects/junit/test2.jar
  • 文件夹:user.classpath = / Projects / junit
  • 以上的任意组合。各个类路径条目需要用分号或冒号分隔,具体取决于底层操作系统

该帖子是关于JUnit的,但是类加载和类路径配置适用于任何外部.jar文件。

请记住,更改类路径不是动态过程,您需要重新启动JMeter才能选择任何新的jar或属性更改。