JMeter-根据超时发送异步请求 [英] JMeter - Send Asynchronous requests dependent on timeout

查看:269
本文介绍了JMeter-根据超时发送异步请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测试计划,其中包含多个我想达到某个TPS的HTTP请求.

I have a Test plan with several HTTP request I want to reach a certain TPS.

某些请求需要花费几秒钟的时间,并且我想以异步方式执行它们,因此我将继续执行其他请求,同时异步等待响应(以后再检查)

Some request takes more than a few seconds, and I want to execute them in asynchronous way so I'll continue executing other request while waiting for response asynchronously (later to be checked)

更好的是(一般情况下),我希望有3秒的等待时间,如果过了3秒就可以继续下一个请求

Better yet (general case), I would like to have a time limit of 3 seconds wait, and if 3 seconds past to continue to next request

有没有办法在JMeter中提交这种情况?或其他将JMeter执行为Taurus或插件的工具? 我发现了类似的 answer ,但这是所有请求都是异步的

Is there a way to submit such scenario in JMeter? or other tool executing JMeter as Taurus or plugin? I found similar answer but it's for all requests to be asynchronous

推荐答案

  1. 关于reach a certain TPS,您可以使用并发线程组吞吐量调整计时器组合.可以使用反馈来连接它们功能 ,因此JMeter将启动额外的线程以达到并维持目标吞吐量.
  2. 关于time limit-您可以在 HTTP请求默认值配置元素

  1. With regards to reach a certain TPS you can go for Concurrency Thread Group and Throughput Shaping Timer combination. There is a possibility to connect them using feedback function so JMeter will kick off extra threads in order to reach and maintain the target throughput.
  2. With regards to time limit - you can define this 3 seconds timeout on "Advanced" tab of the HTTP Request Defaults configuration element

该设置将应用于HTTP请求默认值范围中的所有HTTP请求采样器>,这样您就可以保证在任何情况下您的请求都不会超过3秒,因为默认情况下,JMeter将无限期地等待响应.

the setting will be applied to all HTTP Request samplers in the HTTP Requests Defaults scope, this way you will get guarantee that under any circumstances your request will not last longer than 3 seconds as by default JMeter will wait for response infinitely.

这篇关于JMeter-根据超时发送异步请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆