Home  >  Article  >  Backend Development  >  For example: Continuously initiate 100 requests to an interface, carrying the parameter GET. Are there any good tools that you can recommend? Thank you all.

For example: Continuously initiate 100 requests to an interface, carrying the parameter GET. Are there any good tools that you can recommend? Thank you all.

WBOY
WBOYOriginal
2016-07-06 13:51:521652browse

For example: Continuously initiate 100 requests to an interface, carrying the parameter GET. Are there any good tools that you can recommend? Thank you all.

Reply content:

For example: Continuously initiate 100 requests to an interface, carrying the parameter GET. Are there any good tools that you can recommend? Thank you all.

Thank you for the invitation.
Many tools can do it, such as curl (PHP can be done with curl extension), Apache Bench (referred to as ab), WebBench, and siege.

Thank you for the invitation
Apache’s ab command can easily do concurrent testing

jmeter

Python is the easiest, just know how to use requests

<code>ab -c 1 -n 100 https://segmentfault.com/q/1010000005840937?_ea=921790</code>

For example: Continuously initiate 100 requests to an interface, carrying the parameter GET. Are there any good tools that you can recommend? Thank you all.

PHP: file_get_contents
jQuery: $.get
——————————
Let’s make a loop outside

You can use JavaScript scripts to build fetch in es6 and use a for loop to generate 100 concurrent requests

Unsupported browsers can initiate requests through jquery’s ajax method

Then there is the use of stress testing tools apache’s abR and java software jmeter, etc.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn