https://www.jianshu.com/p/6bc152ca6126
BeanShell断言脚本:
if(!ResponseCode.equals("200")){ Failure = true; // 断言结果为失败
// 断言返回的消息
FailureMessage = "请求失败,返回码: " + ResponseCode + "\n";
log.info(FailureMessage); }
String response = new String(ResponseData); Failure = true; // 断言结果为失败 FailureMessage = "请求返回数据为: " + response + " 12345 \n"; // 断言返回的消息 log.info(FailureMessage);