JMeter:如何在不覆盖现有值的情况下将循环的每次迭代中获取的响应合并到一个文件中?

JMeter: How to combine responses fetched in each iteration of a loop, in a file without overwriting the existing values?

我有一个 JMeter 测试,它发送一个获取特定数据的 GET 请求。我正在使用一个 while 控制器和一个计数器来循环,直到满足预期条件。使用 Xpath 提取器,我能够从 JMeter 响应中提取所需的值。

但是需要每次循环都将数据写到同一个文件中,而不是文件中的数据被覆盖。有没有办法做到这一点?请找到附件中的图片。

我是 JMeter 的新手。请帮忙。谢谢

JMeter Test

哪种“数据”以及哪种格式?

  1. sample_variables property allowing JMeter to store the value of one or more JMeter Variables into the .jtl results file作为单独的一列

  2. 您可以更改 Sampler 标签以包含您要“写入”的值

  3. 您可以使用 Flexible File Writer,它可以让您或多或少完全控制存储的内容、位置和方式