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
待续...
标签:
Jmeter
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
2021-04-14 Linux每天练习--常用命令(tail)
2021-04-14 JMeter常用函数--__uuid()
2021-04-14 JMeter常用函数----__MD5()