Jmeter测试计划中也定义了包的具体位置;但是在BeanShell PostProcessor中import仍然找不到??

为啥在jmeter中导入一个包,然后在测试计划中也定义了包的具体位置;但是在BeanShell PostProcessor中import仍然找不到?

找了好久各种办法都试过了,仍然报错,提示找不到相应的包和方法,求大神详解

错误如下:
2019/03/14 10:36:33 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import . . . '' : Typed variable declaration : Method Invocation JSON.parseObject 2019/03/14 10:36:33 WARN - jmeter.extractor.BeanShellPostProcessor: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import . . . ‘’ : Typed variable declaration : Method Invocation JSON.parseObject ## 插入链接与图片
报错代码如下:
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

String response_data = prev.getResponseDataAsString(); // //获取url返回的串的所有内容
JSONObject data_obj = JSON.parseObject(response_data);
String json=data_obj.get(“data”).toString();
JSONObject jso=JSON.parseObject(json);//json字符串转换成jsonobject对象
JSONArray jsarr=jso.getJSONArray(“dailyDeliveryGoodsDtos”);//jsonobject对象取得数组,具体到某种类型的商品信息
String str2=“”;

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值