Jmeter打印异常响应报文-BeanShell断言
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 = "请求断言成功"; }