Add all jars from a folder to jmeter classpath

时光毁灭记忆、已成空白 提交于 2019-11-30 19:24:43

问题


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?


回答1:


As per How to Use JUnit With JMeter guide:

You can also “tell” JMeter to look into additional locations via the “user.classpath” property. This property lives in the “user.properties” file under the /bin folder of your JMeter installation. It can take the following values:

  • Single jar file: user.classpath=/Projects/junit/test1.jar
  • Multiple jar files: user.classpath=/Projects/junit/test1.jar;/Projects/junit/test2.jar
  • A folder: user.classpath=/Projects/junit
  • Any combination of the above. Individual classpath entries need to be separated by semicolon or colon depending on underlying operating system

The post is about JUnit, however class loading and classpath configuration is applicable to any external .jar files.

Remember that changing classpath is not dynamic process and you'll need to restart JMeter in order to pick any new jars or a property change.



来源:https://stackoverflow.com/questions/29399808/add-all-jars-from-a-folder-to-jmeter-classpath

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!