1、在请求中增加 add->postprocessor->Regular Expression Extractor

jmeter中正则表达试匹配多个

 

2、编写匹配表达式

匹配模板是: $1$

匹配次数是: -1 (如果是只要匹配一次,则是填写为1;如果匹配多次就是 -1)

 

jmeter中正则表达试匹配多个

 

3、添加查看变量获取请求,路径是:线程组后面添加-》Add-》Sampler-》Debug Sampler

jmeter中正则表达试匹配多个

 

可以在查看结果树中,查看到 Debug Sampler中,对应的参数获取的值

jmeter中正则表达试匹配多个

 

从图中可以看到,定义的变量 infoId,对应的值取到了infoId_matchNr  这个说明匹配了3个,分别为 infoId_1、 infoId_2 、infoId_3

 

相关文章:

  • 2022-12-23
  • 2022-02-12
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-11-17
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-08-16
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2022-02-20
相关资源
相似解决方案