JMeter -Maven包引用问题的解决方法

问题:Jmeter中引入自己写的Jar包,使用maven,在Eclipse上测试正常,但是运行时提示导入jar包报错,如下

jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import com.stu.demo.companyTest.GetToken; import java.util.*; Map params = new H . . . '' : Typed variable declaration : Method Invocation getToken.getMerchantsURL

解决办法:

1、右键点击项目:Export…
2、选择Java -> Runnable JAR file(注意:这里导出的是 runnable Jar,这样的话依赖的类也可以打进去。强调下:虽然必须有main方法,但实际在jmeter执行过程中 main方法不执行)


猜你喜欢

转载自blog.csdn.net/qq_27791709/article/details/80079584
今日推荐