ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of:

元气小坏坏 提交于 2019-12-07 07:35:31
Dmitri T

There can be the following possible reasons:

  1. You don't have the .jar which provides org.json.JSONObject class in JMeter CLASSPATH.

    • Download the jar i.e. from the Maven central repo
    • Copy it to JMeter's "lib" folder
    • Restart JMeter to pick the .jar up
  2. You dont have the relevant import line. Add it to the beginning of your script:

    import org.json.JSONObject;
    

You can also consider upgrading to JMeter 3.0 which comes with built-in JSON support and provides JSON Path PostProcessor to extract data from JSON responses. If you still want Beanshell - it is also possible, just use json-smart classes

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