1

有人可以解释一下关于http://jmeter.apache.org/usermanual/best-practices.html#lean_mean的建议吗

Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]

4

1 回答 1

2

这是为了解决以下问题:

假设您有 2 个请求:

test?name=toto

测试?名称=titi

一种基本但不好的方法是为上面的每个请求创建 2 个 Http 请求。

建议说的是:

  • 使用以下命令创建 1 个 Http 请求:

测试?名称=${值}

并创建一个包含一列数据和一个名为的变量的 CSV 数据集:

价值

CSV 文件将包含:

  • 多多
  • 蒂蒂

并使用 2 次迭代,这将完全一样。

当然在这里你有 2 行,但在现实生活中你会有数百或数千。

于 2013-08-12T13:52:43.703 回答