接口测试 请教,jmeter 的 beanshell 中如何使用 string 数组

donly · April 02, 2018 · Last by donly replied at April 02, 2018 · 2416 hits

在 beanshell 中写数组代码如下:

String[] target=new String[4];

String[] source = new String[]{"a1","a2","a3","a4"};

运行后报错如下:
org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import com.google.gson.JsonObject; import com.google.gson.Gson; import com.googl . . . '' : Attempt to access property on undefined variable or class name

请问,jmeter 是不支持 string 数组,还是我用错了呢?需要引入什么包吗?

共收到 1 条回复 时间 点赞
donly #1 · April 02, 2018 Author

已解决,不是这个问题,这样用是没有问题的。

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up