如何同步 JMeter 线程组 [英] How to synchronize JMeter Thread groups

查看:30
本文介绍了如何同步 JMeter 线程组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 JMeter 填充数据库.有 2 个线程组并行填充 2 个表.填满这两个表后,我需要启动最后一个线程组来填满第三个表.我该怎么做?是否可以同步 JMeter 线程组?

I fill the database with JMeter. There is 2 thread groups which fill 2 tables in parallel. After these 2 tables filled I need to start the last thread group to fill the third table. How can I do it? Is it possible to synchronize JMeter Thread groups?

推荐答案

你可以为第三个线程组做一个 while 控制器,然后做这样的事情:

You could do a while controller for the third thread group, and do something like this:

线程组 1- 填写表 1 的代码- 最后一步设置用户定义变量Group1_done==true"

ThreadGroup 1 - Code to fill Table 1 - Set a UserDefined Variable "Group1_done==true" as the last step

线程组 2- 填写表 2 的代码- 最后一步设置用户定义的变量Group2_done==true"

ThreadGroup 2 - Code to fill Table 2 - Set a UserDefined Variable "Group2_done==true" as the last step

线程组 3- 当控制器Group1_done==true"&&Group2_done==true"- 填表3的代码

ThreadGroup 3 - WHILE CONTROLLER "Group1_done==true"&&"Group2_done==true" - Code to fill Table 3

这篇关于如何同步 JMeter 线程组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆