System: Self-developed interface management system
System code: Https://github.com/yangjing1989/API
Two key points: simulating a large number of concurrent users & monitoring System load parameter Analysis system bottleneck
Using tools: Top (H Help), Sysstat (need to be installed on the server), Uwsgitop,jmeter
* Test environment to facilitate testing, modify the Sysstat to obtain system information for 1 minutes (default is 10 minutes)
Vi/etc/cron.d/sysstat
First, recording and playback
1. Add HTTP request Default value
2. Add Recording Controller
3. Add HTTP Proxy to Workbench
4. Click "Start" to start recording
5. Browser Settings Agent
6. Visit the application under test and click "Stop" to end the recording.
7. Delete Excess Requests
8. Add Cookie,cookie value After login request set the cookie value in the reference browser
9. Playback View Results
Second, the parameterization of the script
1. Add CSV Data Set Config
2. Configure parameterized data and set parameter name
3. Apply parameter values in each request, such as
Third, determine whether the page is correct
1. Add Response Assertion
Iv. simulation of multi-user concurrency
1. Set multi-user in thread group
2, top view Application server performance, found that the CPU, memory and other indicators are in the normal range. And there are no output errors in the JMeter.
3, increase the concurrent user to 200, to view the server performance, the CPU long-term higher than 90%,jmeter in the average response time of each request has more than 5 seconds, indicating that the system has reached the limit.
4, increased concurrent users to 205,jmeter has begun to appear a large number of errors.
5, the whole process found Uwsgi occupy a large number of CPU,UWSGI is my application use of the Web server. The application itself consumes a large CPU, in which JMeter can see that the login interface responds longer than other interfaces, and the amount of data received from the server is more than 5 times times the number of other interfaces per second. Indicates that the login interface needs to be optimized.
Using JMeter for Web site performance test instances