问题
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)
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
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:
- 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. With regards to
time limit
- you can define this 3 seconds timeout on "Advanced" tab of the HTTP Request Defaults configuration elementthe 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.
来源:https://stackoverflow.com/questions/53645745/jmeter-send-asynchronous-requests-dependent-on-timeout