【问题标题】:Using JSON extractor inside a WHILE controller in JMETER在 JMETER 的 WHILE 控制器中使用 JSON 提取器
【发布时间】:2022-01-06 21:52:29
【问题描述】:

我想获得在运行样本一段时间后出现的 JSON 响应,直到它为空,一段时间后它给出一个“filestore_id”,它是一些随机数。我可以在 while 循环中编写条件以使循环运行直到 JSON 响应中没有 null 并从 JSON 响应中提取 filestore_id,然后可以在该 while 循环之外的示例中使用它。enter image description here

循环 1 的文件存储 ID 为 null。经过一些循环后,当总记录数=记录完成时,它会给出一些 ID 号。

Attached screenshots

Attached screenshot

Attached screenshot

【问题讨论】:

    标签: json while-loop jmeter performance-testing


    【解决方案1】:
    1. “条件”是__jexl3() function,例如:

      ${__jexl3("${filestore_id}" == "null",)}
      
    2. 我不能给你JSON PathJSON JMESPath Expression,因为你preferred to post your JSON response as the image,可能是这样的:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-18
      • 2015-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多