How to get the complete log for bean shell scripts in jmeter

青春壹個敷衍的年華 提交于 2019-12-04 07:48:35

You can enable debug output in at least 2 ways:

  • Adding debug() directive to the beginning of your Beanshell script - debugging output will go to STDOUT (JMeter console)
  • Putting your code inside the try block like:

    try {
        //your code here
    }
    catch (Throwable ex) {
        log.error("Something went wrong", ex);
        throw ex
    }
    

    This way full exception stacktrace will be available in jmeter.log file

I would rather recommend switching to JSR223 Elements and Groovy language as Groovy is more Java-compliant and provides better performance. See Groovy Is the New Black for details.

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