Get the App
SLTechnology News&Howtos  ›  Development  › 

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

Shulou Source: shulou.com Published: 2022-06-02 09:24:09 10月19日 Update

This article will explain in detail how to use jMeter to construct a large number of concurrent HTTP requests for microservice performance testing. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.

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

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

Create a new project:

Create a new Thread Group. The following diagram means that this project will use 3 threads to issue requests simultaneously, each request executed once.

Create a new HTTP request in this Thread Group, maintaining the following attributes:

Protocol: https

Server name:

Http request method: GET

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

Use KeepAlive: February 2013

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

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

After maintenance, click the execute button.

You'll see three threads making HTTP requests at the same time, and you'll see the response time for each request.

You can also run the test on the command line jmeter -n -t and see the same results as you would on the jMeter GUI.

About "how to use jMeter to construct a large number of concurrent HTTP requests for microservice performance testing" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Service name article service measurable parameter at the same time engineering meaning way more threading testing good practical consistent following figure information practice content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Information Microsoft Shulou Tech Info Redmi