How to get full log for bean shell scripts in jmeter

I am using Apache JMeter 3.1, and in my test suite I have BeanShell PreProcessor. When I run the script, in Log ViewerI see that there are errors in the bean script shell. But the error message is very limited, how can I get a complete error?

For example, the error that I see in Log Vieweris as follows:

ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``// Following is a sample for input // "abc.org/def/xyz . . . ''

Is there a way to get a complete error?

+4
source share
1 answer

You can enable debug output in at least two ways:

  • debug() Beanshell script - STDOUT ( JMeter)
  • , :

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

    , stacktrace jmeter.log

JSR223 Elements Groovy , Groovy Java . . Groovy .

+4

Source: https://habr.com/ru/post/1668553/


All Articles