Gatling:从报告中排除准备请求

Gatling: exclude preparation request from reports

这是我在 Gatling 上的测试场景:

val createTemplatesScenario = scenario("Template creation")
  .feed(userFeeder)
  .exec(doLogin) // populates access token in the session
  .exec(doListProviders)
  .exec(doCreateTemplate)
    ...
  .exec(doDeleteTemplate)

我想从报告中排除 登录 请求,因为有时它会在我们的系统上花费太多时间并影响所有指标:

有没有办法"prepare"测试场景,以便只考虑必要的操作?

您可以使用 groups of requests.

将除 登录 之外的所有请求添加到组中。

documentation所述:

If your scenario contains groups, this panel becomes a tree : each group is a non leaf node, and each request is a descendant leaf of a group. Group timings are by default the cumulated response times of all elements inside the group. Group duration can be displayed instead of group cumulated response time by editing the gatling.conf file.

Global Information 节点仍应受到 Login 请求的影响,但您的所有其他请求组的节点应不受影响汇总结果。