Web pressure Architecture
Zhang Jianling
Web Pressure architecture ... 1
A system performance Test overview ... 1
1.1 Performance Test Overview ... 1
1.2 Indicators of performance testing ... 2
1.3 Description of key points ... 2
1.4 Purpose of performance testing ... 2
1.5 test project Development Specifications ... 2
Two Tests using the VS stress test tool ... 3
2.1 Performance Test (WebTest). 3
2.1.1 Concept ... 3
2.1.2 How to build a performance test ... 3
2.1.3 using CS code to quickly build performance tests ... 5
2.1.4 running the current performance test ... 6
2.2 Load (pressure) test (LoadTest) ... 6
2.2.1 Concept ... 6
2.2.2 Purpose ... 6
2.2.3 Terminology ... 6
2.2.4 How to build a load test ... 7
2.2.5 Load test run-time description ... 10
2.2.6 Analysis Report Description ... 11
2.3 Test Scenario Description ... 12
2.4 Main business Modules ... 12
Filling of three test data ... 13
3.1 WebTest Tool Fill ... 13
3.2 Edit business code manually ... 13
3.3 Filling with the Redgate.sqldatagenerator tool ... 13
A System performance Test Overview 1.1 Performance Test Overview
This test is for the Learning Bar System in response to the pressure of dense full turn of the business processing capacity testing, testing system throughput rate. The pressure test of the system is mainly for the main user registration, login, User Center, Class circle, order, check the application peak period, the number of concurrent users when the processing capacity and so on.
1.2 Indicators for performance testing
1 Application load Capacity: The maximum number of users that the system can tolerate, that is, the maximum number of clients that the system can support in the normal response time.
2 Application System Throughput rate: that is, the application system in the unit time to complete the volume, that is, in unit time, the application system for different load pressure, the number of transactions can be completed.
3 System responsiveness: That is, in the case of various load pressures, the system response time, that is, from the client request initiated, to the server-side response to return the time required, including network transmission time and server processing time.
4 The reliability of the application system: that is, in the continuous working time state, the system can run normally, that is, in the continuous working time period of time, there is no error message
1.3 Description of key points
The performance of the system under different user (concurrency) pressures: The number of concurrent users supported and the frequency of concurrent user transmission, as well as the processing power of the system and the CPU, database I/O and memory usage under large pressure, and identify the corresponding performance bottlenecks
1.4 Purpose of the performance test
The purpose of the stress test is to verify the maximum throughput of the system and to test the current business system in various pressure trading
The operating condition of the volume, check the system to run the bottleneck, obtain the system processing ability and so on.
The test for the system's stress test is to:
1 gives the current performance status of the system
2 Locating system performance bottlenecks or potential performance bottlenecks
3 summarize a set of reasonable, operable, suitable for the company's actual situation of the performance test scheme, for the follow-up performance testing work to provide basic ideas
1.5 Test Project Development specification
1 adding a test project to a specific project solution
2 Create a separate folder for each module
3 developers can build performance tests using code methods, and non-professionals can build performance tests by recording
4 test domain name does not use IP address, you can configure the virtual domain name in the hosts, so as to facilitate later modification
5 data dynamic parameters using CSV file, for non-encrypted information can be directly connected to the database to get real data
Two Tests using the VS pressure test Tool 2.1 performance test (WebTest) 2.1.1 Concept
Recording some of the testing process and saving it as a webtest generates a Web performance test that can be added to a load test project to complete the stress test. (A Load test project consists of multiple Web performance tests)
2.1.2 How to build a performance test
- Need to install Visual Studio Ultimate Edition
- To create a WEB performance and load test project
1 Creating a Web performance test
Your Web browser opens.
2 Enter the URL of the Web site you want to test.
3 If you want customers to use their own apps, please use them as well. For example, search for items and add them to your shopping cart. The logger captures HTTP requests and responses.
4 When you are finished, stop recording.
Now, Visual Studio looks for dynamic parameters for each HTTP response of your HTTP request. When this happens, the progress bar is displayed.
5 Rename your test. For example, learn about the home page. webtest.
6 Edit test properties to specify performance targets. For example, you can set the page response time target to 1 seconds. (this value is used during load testing)
7 Save the test.
2.1.3 Quickly build performance tests using CS code
After you generate a performance test from the wizard, you can also generate a code file that allows our developers to edit it directly
2.1.4 running the current performance test
After running the performance test, it simulates the request you defined and completes the process for you
The test results are displayed after they are run.
2.2 Load (pressure) test (LoadTest) 2.2.1 Concept
Load testing is the ability to determine the performance of a system under various workloads, and the goal is to test the corresponding output items of the system components, such as throughput, response time,CPU load, Memory usage , etc. to determine the performance of the system. Load testing is an analysis of software applications and support architectures that simulate the use of real-world environments to determine the performance processes that can be received . A stress test (Stress testing) is a test of the maximum service level that the system can provide by determining the bottleneck of a system or a performance point that cannot be received .
2.2.2 Purpose
Through the pressure test, judging the current application environment under the circumstances of the system's load capacity, for the future expansion of the scope of application, the increase in user volume, server expansion, upgrade, etc. to provide the necessary technical support, and server planning.
2.2.3 Terminology
Application Server
Application processing server in website/software architecture, providing request receiving, processing, returning Web request
Database server
Data processing server in website/software architecture, providing functions such as storage and reading
Test machine
A computer designed for stress testing, usually a common pc
Number of system users
Refers to the total number of users who may actually use the application system
Number of users online
Refers to the number of users who are currently logged on to the application, in an active or idle state
Number of concurrent users
Refers to the number of users currently logged in to the application and operating concurrently
Response time
refers to the processing time between the server receiving a request and the return request. In the stress test, ignoring the network transmission time and the processing time in the test machine, the response time on the test machine is the response time of the server.
2.2.4 How to build a load test
1 Create a new load test in the WEB performance and load test project.
2 After the Load Test Wizard appears, select the Load mode step.
Change the load pattern to a tiered payload. This will gradually add users over time.
3 Select the test mix step.
Add the Web performance test that you created.
Move the WEB performance test to the list of tests that you want to run.
4 After completing the wizard, the Web performance test is added to the load test and displayed in the Load Test Editor.
2.2.5 Load test run-time description
During a test run, you may develop a page that responds more than you set the value.
Add analysis notes to track issues.
After the load test is complete, a summary is displayed.
The results of the completed tests contain performance counter data, threshold violations, and error messages. Note that if the corresponding time is not set in the performance test (default is 0), do not care about this data, even if your response time is slow, it will not appear to pass the situation,
2.2.6 Analysis Report Description
Load Test Summary
Overall results
Maximum User load |
225 |
Test/sec |
15.9 |
Tests that were not passed |
6,928 |
Average test time (seconds) |
12.9 |
Number of transactions per second |
0 |
Average transaction time (seconds) |
0 |
Pages per second |
20.1 |
Average page time (seconds) |
10.2 |
Requests/sec |
174 |
Number of failed requests |
0 |
Number of requests cached as a percentage of the total number of requests |
57.7 |
Average response time (seconds) |
1.20 |
Average content Length (bytes) |
1,346 |
Key statistical information : The slowest 5 a page
URL (more links to more details) |
95% page time (seconds) |
Xxx |
19.0 |
Xxx |
8.08 |
Xxx |
0.13 |
Key statistical information : The slowest 5 a test
Name |
95% test time (seconds) |
User Registration |
29.1 |
Test results
The test Results section lists all the tests and scenarios in the load test. It displays the test name, scheme, number of runs, number of failures, and average test time. You can select the name of a test to open the test table and view more details about the test.
Name (performance test name) |
Scenario (scenario name) |
Total Tests |
Number of failed tests (% of total) |
Average test time (seconds) |
Xxx |
My class circle. |
2,507 |
0 (0) |
21.4 |
Xx |
Student Landing-Incremental test |
5,346 |
5,325 (99.6) |
10.1 |
Xxx |
Student Landing-Huan Ding test |
1,666 |
1,603 (96.2) |
8.80 |
Page results
The page Results section lists all the pages in the load test. The URL, scheme, test name, average page time, and count are displayed. You can select the URL of a page to open the pages table and view more details about the page.
Page results
URL (more links to more details) |
Scheme |
Test |
Average page time (seconds) |
Count |
Xxx |
My class circle. |
My class circle. |
11.5 |
2,507 |
Xxx |
Student Landing-Incremental test |
Landing |
10.1 |
5,346 |
Xxx |
My class circle. |
My class circle. |
9.87 |
2,550 |
Xxx |
Student Landing-Huan Ding test |
Landing |
8.80 |
1,666 |
Error
The Errors section lists all the errors that occurred during the load test. The error type and subtype, count, and latest message are displayed. You can select an error to open the Errors table and see more details about the error.
Type |
Sub-type |
Count |
Last Message |
Abnormal |
SocketException |
2 |
The connection attempt failed because the connecting party did not reply correctly after a period of time or the connected host did not respond. 163.177.72.159:80 |
Transaction results
The transaction Results section lists all the transactions in the load test. The transaction name, scheme, name, response time, time spent, and count are displayed. You can select the name of a transaction to open the Transactions table and view more details about the transaction.
Controller and Agent Resources
The Controller and Agent Resources section lists the computers that are used to run the tests. The computer name, percentage of processor time, and available memory are displayed. You can select a computer name to open the controllers and agents graph and view resource usage at different times.
User Distribution Map
Test results Table
Relationship Chart
2.3 Test Scenario Description
In the test, the test run scenario is arranged using a stepwise pressurized mode:
- Increase 1 user connections every 2 seconds, up to 100 users, view and record operations
- Increase 2 user connections every 2 seconds, up to 200 users, view and record operations
- Increase 1 user connections every 2 seconds, up to 300 users, view and record operations
- Increase 1 user connections every 3 seconds, up to 400 users, view and record operations
- Constant load, number of users fixed 100, 200, 500
Each of these scenarios includes:
- User Login
- Business operations
- Business completion
- Exit the system, all use cases are based on the above scenario
- User Registration
- User Login
- Teacher Certification
- Teacher Center
- The teacher opened the class circle
- Teacher set up a course
- The teacher set up the homework
- The teacher set up the test
- Student Center
- Student Purchase
- Student Learning
- Student Recharge
- Class Circle Display Page
- Class Circle List Page
- Home
2.4 Main business modules filling of three test Data 3.1 webtest tool fill
Use WebTest to record the specified page logic, such as user registration, establishing a course, and then test the data with the stress test tool LoadTest to write to the real library.
3.2 Edit Business code manually
Developers go to the business of the specified module two times, and then use a circular way to batch the data into the real database can be
3.3 Filling with the Redgate.sqldatagenerator tool
Simple operation, easy to get started!
1 Define the number of generated data
2 Preview generated data results
3 The specified data columns can be edited, the columns of the numeric type can be random, incremental generation, set the maximum and minimum values and so on
4 pairs of character-type columns that can be filtered by regular expressions
5 for a date-time type column, you can set the start date and end date, and the random generation and increment generation and time period generation, etc.
6 One-click Generate data and provide data-generated reports
Stress Test ~ A complete set of stress test project documentation