[英]Can we print success message/Assertion Result from Response Assertion in BeanShell PostProcessor using Jmeter?
[英]Beanshell assertion successfull message in Jmeter
下面給出我在 beanshell 斷言中使用的代碼片段來驗證soap/json 響應。 如果兩個值(名稱)不等於我的 bean shell 斷言顯示失敗消息,如下所示(我可以在查看結果部分看到斷言失敗)。 如果 bean shell 斷言通過或條件通過,我想顯示成功消息? 誰能建議如何在查看結果部分顯示成功消息?
String soap_firstName=vars.get("soap_firstName");
String json_firstName=vars.get("json_firstName");
if(!soap_firstName.equals(json_firstName)){
Failure=true;
FailureMessage = "SOAP first name not match with Json first name ";
} else{
Failure=false;
//TODO: send the result to assertion message section -> "SOAP and Json first name are equal";
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.