Jmeter分布式测试问题 [英] Jmeter Distributed Testing Issue
问题描述
有没有办法在 Jmeter 的分布式测试中跨从站同步线程组运行"?
Is there a way to synchronize "thread group runs" across slaves in Jmeter's distributed testing?
例如,假设我的测试计划有 2 个线程组,并且我使用 2 个从站运行 JMeter.如果其中一个从站首先完成第一个线程组,我希望该特定从站等待另一个从站完成也是第一个线程组.然后我要他们一起进行第二个!
For example, Suppose my test plan has 2 thread groups and I run JMeter with 2 slaves.If one of the slaves finishes with the first thread group first, I want that particular slave to wait until the other slave gets done with the first thread group as well. Then I want them to proceed with the second one together!
请帮忙解决这个问题.
推荐答案
我不认为我们在 JMeter 中有一个直接的方法.我假设您连续运行线程组.
I do not think we have a straight forward method for this in JMeter. I assume you run your thread groups consecutively.
在这种情况下,让我们在中间再添加一个线程组,如下所示.让线程数为 1.创建一个 Beanshell 采样器 - 您可以在此处执行您自己的同步操作.(在公共位置创建一个文件 - 等到文件总数 = 从属总数.这几乎会使您的同步准确.
In this Case, Lets have one more thread group in between as given below. Let the thread count be 1. Create a Beanshell Sampler - You can do your own sync operation here. (create a file in a common location - wait till total no of files = total no of slaves. it will almost make your sync accurate.
我认为这种方法会有所帮助!
I think this approach will help!
或
您可以进行 2 个测试 - 1 个 JMX 文件中的第一个线程组和第二个 jmx 文件中的第二个线程组.第一个测试完成后,只需调用第二个测试.
You can have 2 tests - First Thread Group in 1 JMX file and second thread group in second jmx file. Just call the second test once the first test is complete.
这篇关于Jmeter分布式测试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!