简体   繁体   English

重复jmeter http请求未显示在“聚合报告”侦听器中

[英]repetitive jmeter http request doesn's show in Aggregate Report listener

I've configured 1 thread, loop count 2 and Aggregate Report as a listener with some http request sampler. 我已经配置了1个线程,循环计数2,并且使用某些HTTP请求采样器将Aggregate Report配置为侦听器。 Caching is enabled. 启用缓存。 When I run my test plan I get only one sample of each request in Aggregate Report. 运行测试计划时,我在汇总报告中仅收到每个请求的一个样本。 Some Cached requests are not even hitting second time to server whereas for some are getting executed again. 一些缓存的请求甚至没有第二次到达服务器,而对于某些则再次被执行。 Can anyone explain what settings I need to configure for getting report of all request samples. 谁能解释一下我需要配置哪些设置才能获取所有请求样本的报告。 Thank you in advance. 先感谢您。

please find image of result here 请在这里找到结果的图片

This is by design, JMeter's HTTP Cache Manager respects Cache-Control headers like Etag and If-Modified-Since so on second requests embedded resources like image, scripts, fonts, styles are being returned from cache, no actual request is being made. 这是设计使然,JMeter的HTTP缓存管理器遵循诸如EtagIf-Modified- Cache之类的Cache-Control标头,因此在第二次请求中,从缓存中返回了嵌入式资源(如图像,脚本,字体,样式),而没有发出任何实际请求。 This is what real browsers would do. 这就是真正的浏览器会做的。

JMeter缓存的使用

If for any reason you want all requests to be executed each time you need to: 如果出于任何原因您希望每次都执行所有请求,则需要:

  1. Tick Clear cache each iteration box in the HTTP Cache Manager 勾选Clear cache each iteration在HTTP缓存管理器中的Clear cache each iteration

    JMeter清除缓存

  2. Remove Loop Controller from the Test Plan 从测试计划中删除回路控制器
  3. Set desired number of loops on Thread Group level 线程组级别设置所需的循环数

    JMeter循环线程组

See Using the HTTP Cache Manager for more information on embedded resources caching if needed. 如果需要,请参阅使用HTTP缓存管理器以获取有关嵌入式资源缓存的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM