【发布时间】:2014-03-25 13:40:58
【问题描述】:
使用 Jmeter,我想实现这样的目标:
Thread Group 1
- Http Request 1
- Set P1 to "true"
- Wait synchronization with Thread Group 2 (parameters P1 and P2 are both "true")
- Http Request 2
Thread Group 2
- Http Request 1
- Set P2 to "true"
- Wait synchronization with Thread Group 1 (parameters P1 and P2 are both "true")
- Http Request 2
这与here 和here 描述的基本相同:我将 P1 和 P2 设置为“true”,如下所示(HTTP 请求/BeanShell 都有效):
${__setProperty(P1,"true",)}
我的问题是如何实现等待条件。我已经为 while 控制器的退出条件尝试了所有可能的组合,但无法实现我想要的。奇怪的是,放置在循环中的 Debug 采样器(或带有 log.info 的 beanshell)显示属性 P1 和 P2 已正确设置(并且退出条件满足我的期望),但它无论如何都不会退出。例如我试过:
${__property("P1")}!="true"||${__property("P2")}!="true"
${__property(P1)}!="true"||${__property(P2)}!="true"
${__property(P1)}=="true"&&${__property(P2)}=="true"
${__property("P1")}=="true"&&${__property("P2")}=="true"
有人可以帮助我吗?提前致谢!
【问题讨论】:
标签: jmeter