For example, I have developed a microservices and want to test how well they perform under large concurrent requests.
A convenient approach is to use tool JMeter to construct these requests.
To create a new project:
Create a new thread Group, meaning that the project will use 3 threads to send the request at the same time, each request executes once.
In this thread group, create a new HTTP request that maintains the following properties.
On the Parameters tab, maintain the parameter name $search, and the value is ' Wang '. This request means that an instance of the account name ' Wang ' is queried using the OData request.
Create a new HTTP Header Manager to maintain the authorization information for executing this request. Here I use the Basic authentication method, that is, the HTTP header name is called authorization, the value is the user name: the password after the base64 encoded value.
When maintenance is complete, click the Execute button
3 threads are observed to make HTTP requests at the same time and to see the response times for each request.
You can also perform the test with the command line Jmeter-n-T, and see the results consistent with the execution on the JMeter GUI.
To get more original Jerry's technical articles, please follow the public number "Wang Zixi" or scan the QR code below:
Micro-service performance testing using JMeter constructs a large number of concurrent HTTP requests