java - 记录场景中的双重http请求
解决方案
There is one "golden rule": well-behaved JMeter test must represent a real user using a real browser with 100% accuracy.
So you should not be asking random people over the internet whether you need to remove a request, you need to check whether your browser sends 1 or 2 requests, you can do this using your browser developer tools or an external sniffer tool like Fiddler or Wireshark
JMeter shouldn't generate duplicate requests, if you seeing 2 similar (or same) ones it means that your browser actually sent them so you should have the same network footprint in JMeter. If you don't want duplicate code - delete one and put another under the Loop Controller.
Your application might use some polling mechanism periodically sending AJAX requests for updating a part of data on the page and you should be doing the same in JMeter
推荐阅读
- android - 如何在张量流上检测图像对象?
- android - 在后台使用 Fence API 是否需要 Android P 中的前台服务
- javascript - 在 setInterval 内安排 setTimeout
- git - 如何快速从 SVN 迁移到 Git?
- python - 在 Python 中连接到 MS Access
- python - 带轴的 Matplotlib 图例
- jquery - 错误的参数传递给 jquery
- ruby-on-rails - 简单形式:有条件地禁用字段
- python - 使用numpy用不同的字符串替换数组中的整数
- javascript - JavaScript:检查何时未按下按钮而不使用 onkeyup