【发布时间】:2016-08-10 20:36:57
【问题描述】:
我不理解我在 Apache JMeter 中的 BeanShell 断言响应。
int varcount = Integer.parseInt(vars.get("getcount"));
if ((varcount) < 25000) {
Failure = true;
FailureMessage = "testnsg";
}
getcount 值是 39000。当它低于 25000 时,我需要收到警报并停止测试。但是,上面的脚本运行良好,没有任何错误,当我将比较更改为 ((varcount) > 25000) 然后我得到一个警报,结果是"
Assertion error: false
Assertion failure: true
Assertion failure message: testnsg
这与我的预期相反。有什么想法吗?
【问题讨论】: