Jmeter打印异常响应报文

import org.json.*;
static String responseData = prev.getResponseDataAsString();
//log.info("响应体:"+responseData);
JSONObject responseJson = new JSONObject(responseData);
int code = responseJson.getInt("code");
if(code != 200 )
{
 Failure = true;
 FailureMessage = "作业输出文件上传-请求断言失败,响应体为:"+responseJson;
}
else 
{
 Failure = false;
 FailureMessage = "请求断言成功";
}

Jmeter打印异常响应报文

 

上一篇:大数据面试题


下一篇:关于com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure的解决