【发布时间】:2017-02-22 13:36:52
【问题描述】:
在测试计划中有 2 个 Jmeter 线程组。
Threadgroup 1
Java sampler 1
- produce some messages
Constant timer delay with 1000ms.
Threadgroup 2
Java sampler 2
- Message will have 2 variables like "${var1} is going for walk in ${var2} ground"
Constant timer delay with 60000ms.
每个线程组将有 10 个线程运行 30 分钟。
但是线程组 1 线程每秒会产生消息。 Threadgroup2 线程将根据定时器的延迟每分钟产生消息。
两个线程组并行运行
到目前为止,我能够让它工作。
但我有一部分不知道如何实现。第二个threadgroup2 java sampler中的var2是动态生成的。我需要根据同一个线程号的这个 var2 值来控制我的线程组 1 采样器。
i.e If thread1 of second threadgroup2 var2 has value "abc", then thread1 in threadgroup2 should not execute. Untill same threadnumber in second threadgroup , changes the value. Only that particular thread number should get controlled.
Other threads should continue to execute. I tried to place while controller with var2 == "abc" & if controller . But did not see any change.
知道如何解决这个问题吗?提前致谢。
【问题讨论】:
标签: java multithreading jmeter