Jmeter日常--Beanshell脚本日常报错

1.Typed variable declaration

2022-04-14 14:19:17,747 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval    Sourced file: inline evaluation of: ``String  response =prev.getSubResults()[0].getSubResults()[0].getResponseDataAsSt . . . '' : Typed variable declaration
2022-04-14 14:19:17,748 WARN o.a.j.e.BeanShellPostProcessor: Problem in BeanShell script: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval    Sourced file: inline evaluation of: ``String  response =prev.getSubResults()[0].getSubResults()[0].getResponseDataAsSt . . . '' : Typed variable declaration

说明:这个错误不会指明哪行那个地方报错,不明白的不好找;

一般是指代变量赋值格式不支持,不正确,可以从变量定义或者赋值去排查

有可能是JAVA兼容的, 到Jmeter不一定支持

2.Method info( int ) not found in class'org.apache.logging.slf4j.Log4jLogger'

2022-04-14 14:30:19,227 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval    Sourced file: inline evaluation of: ``String  response =prev.getSubResults()[0].getSubResults()[0].getResponseDataAsSt . . . '' : Error in method invocation: Method info( int ) not found in class'org.apache.logging.slf4j.Log4jLogger'
2022-04-14 14:30:19,227 WARN o.a.j.e.BeanShellPostProcessor: Problem in BeanShell script: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval    Sourced file: inline evaluation of: ``String  response =prev.getSubResults()[0].getSubResults()[0].getResponseDataAsSt . . . '' : Error in method invocation: Method info( int ) not found in class'org.apache.logging.slf4j.Log4jLogger'

说明:log.info()不支持数字,列表等,只支持String

 

待续...

 

posted @ 2022-04-14 14:33  沙丘蚂蚁慢慢爬  阅读(1678)  评论(0编辑  收藏  举报