Jmeter顺序执行多个http请求时的聚合报告

时间:2022-11-08 08:50:04

Jmeter顺序执行多个http请求,形成多条聚合报告数据

  • jmeter顺序执行http请求
    项目中,http请求数据要从其他接口获取,即要顺序执行两个http请求。

    由网上查知:1.在jmeter中,同一个线程组下面的Sampler是顺序执行的。按执行顺序添加Sampler即可。
    2.如果是不同线程组,需要在测试计划中勾选独立运行每个线程组。

  • 多个http请求产生的各自的聚合报告数据
    在形成的聚合报告中,发现只有一行http请求统计数据,无法确定是哪一个http请求的测试结果,还是两个请求测试结果的综合数据。
    Jmeter顺序执行多个http请求时的聚合报告

于是上网搜相关资料,从jmeter官网中发现以下解释:

If other samplers and timers are in the same thread, these will increase the total time, and therefore reduce the throughput value. So two identical samplers with different names will have half the throughput of two samplers with the same name. It is important to choose the sampler labels correctly to get the best results from the Report.

大意是在同一线程组中,两个同名 samplers得出来的吞吐量值会是两个不同名samplers的两倍,改成不同label,将会有如下效果,即有多条记录。(截图来自jmeter官网)
Jmeter顺序执行多个http请求时的聚合报告