【发布时间】:2017-09-12 06:19:22
【问题描述】:
我在脚本中添加了 bean shell 断言。
它显示所有情况的失败消息,即使它通过了。
下面是我的脚本
String response = new String(ResponseData);
if(${BoolValue} == true)
{
Failure = !(response.contains("growth"));
FailureMessage = "Projection values is showing in the response data for non-skill reports";
}
if(${BoolValue} == false)
{
Failure = (response.contains("growth"));
FailureMessage = "Projection values is not showing in the response data for skill reports";
}
仅当案例失败时,我才需要获取失败消息。请告诉我,如何做到这一点?
【问题讨论】:
标签: java netbeans jmeter assertions beanshell