Multithreading JMeter在搜索结果后连接当前线程

Multithreading JMeter在搜索结果后连接当前线程,multithreading,jmeter,Multithreading,Jmeter,我已经设置了一个JMeter脚本: For a number of pages of information 1) Loads 1 page of information 2) Parses out a set of elements to be looked up from that page 3) Queries each of the parsed elements 问题是上面的(3)是串行的,而我需要它是并行的。有没有办法做到这一点或更好的例子 我的测试计划大纲

我已经设置了一个JMeter脚本:

For a number of pages of information
    1) Loads 1 page of information
    2) Parses out a set of elements to be looked up from that page
    3) Queries each of the parsed elements
问题是上面的(3)是串行的,而我需要它是并行的。有没有办法做到这一点或更好的例子

我的测试计划大纲:

Thread group
+ Loop Controller (load more than 1 page of information)
    Counter (Controls the start of my page loading)
  + HTTP Request (Loads the page of information)
      Regular Expression Extractor (To get my elements)
  + ForEach Controller (Varies over my extracted elements)
      HTTP Request (My retrieved elements)
ForEach控制器/和最后一个HTTP请求是我需要并行的,这是我正在模拟的浏览器中的行为


谢谢

假设您的正则表达式提取器引用名称为
PARAM
,您应该会得到如下结果:

PARAM_1=some value
PARAM_2=some other value
PARAM_matchNr=2
为了实现并发性,您需要删除您的ForEach控制器,并执行如下计划:

Thread group
+ Loop Controller (load more than 1 page of information)
    Counter (Controls the start of my page loading)
  + HTTP Request (Loads the page of information)
      Regular Expression Extractor (To get my elements)
  + HTTP Request (My retrieved elements)
      Synchronizing Timer
相关配置:

在HTTP请求(我检索到的元素)中,您需要参考
{PARAM_1}
等。请输入以下代码:

${__V(PARAM_${__threadNum})}
-s JMeter函数,该函数返回当前线程的数目,因此动态参数对于第一个线程为${PARAM_1},对于第二个线程为${PARAM_2},等等

暂停线程执行,除非满足指定的线程数。我的期望是,您希望线程数等于正则表达式匹配数。为此,将以下内容放入“要分组的模拟用户数”输入中:

记住,您需要在线程组中提供足够多(等于匹配数量或更多)的线程,否则您的测试将无限挂起。


希望这有帮助

谢谢,我试试看
${PARAM_matchNr}