Use jMeter to construct a large number of concurrent HTTP requests for microservice performance testing

For example, I have developed a microservice and want to test its performance under large concurrent requests.

A more convenient way is to use the tool jMeter to construct these requests.

Create a new project:

Create a new Thread Group. The figure below means that this project will use 3 threads to send requests at the same time, and each request will be executed once.

Create a new HTTP request in this Thread Group, maintaining the following properties.

  • Protocol: https

  • Server name:

  • Http request method: GET

  • Http path: /sap/c4c/odata/v1/c4codata/AccountCollection/

  • Use KeepAlive: do not select

On the Parameters tab page, maintain the parameter name $search with the value 'Wang'. This request means to use the Odata request to query the instance with the account name 'Wang'.

Create a new HTTP Header Manager that maintains the Authorization information to perform this request. Here I use the Basic authentication method, that is, the HTTP header name is Authorization, and the value is the username:password after base64 encoding.

After the maintenance is completed, click the Execute button.

3 threads are observed making HTTP requests at the same time, and the response time for each request can be seen.

The test can also be executed with the command line jmeter -n -t, and the results you see are the same as those executed on the jMeter GUI.

To get more original technical articles from Jerry, please follow the public account "Wang Zixi" or scan the QR code below:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325043847&siteId=291194637