JMeter BeanShell断言

2021-09-10  本文已影响0人  Gakki0725
作者:Gakki

BeanShell断言

String Str = "200";
reshead = prev.getResponseCode();
resbody = prev.getResponseDataAsString();
//log.info(reshead)

if(reshead.contains(Str) == false){
Failure = true;
String Msg = "error_code!!!!";

FailureMessage = Msg + "响应内容:\n" + resbody + "\n";
log.info(FailureMessage);
}
 
BeanShell断言
响应内容
上一篇 下一篇

猜你喜欢

热点阅读