本文介绍了如何同步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的代码 -将UserDefined变量"Group1_done == true"设置为最后一步

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

线程组2 -填写表2的代码 -将UserDefined变量"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线程组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 04:47