新手求教--Jmeter断言脚本问题
import org.json.*;import java.util.Arrays;
import org.apache.jmeter.assertions;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.assertions.AssertionResult;
import org.json.simple.JSONArray;
import org.json.simple.JSONException;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
String jsonString = prev.getResponseDataAsString();//get response
JSONObject responseJson = new JSONObject(jsonString);//change to Json
String prompt = responseJson.getString("prompt");//get the value of prompt
if (!content.contains("错误")) {
Failure =false;
FailureMessage = "失败";
}else{
Failure = true;
FailureMessage = "成功";
}返回错误:BeanShell断言 :
org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.json.*; import java.util.Arrays; import org.apache.jmeter.assertions; . . . '' : Typed variable declaration : Class: JSONObject not found in namespace这是什么错误啊?求指教
引入宝没有响应的对象 https://www.cnblogs.com/xpp142857/p/7374281.html参考一下 :)
页:
[1]