Asp. NET negative pressure test

Source: Internet
Author: User
Tags modify visual studio
asp.net Objective
For Web applications facing Internet users directly, it is important to be careful when developing the design, because no one knows the speed at which Web programs are accessed and run within a unit of time. Therefore, after the program design is completed, finally to the program to carry out some rigorous or even harsh tests to determine whether the program in the complex network environment and server under high pressure load can maintain normal and relatively stable efficiency.

What is a negative pressure test
Negative pressure testing is generally done for Web applications, such as Web sites. The purpose of the negative pressure test is to determine whether the Web application can correctly and securely handle the uncertain requests submitted by various users in the real network environment, and verify the robustness of the program.
Another objective of negative pressure testing is to deliberately provide enough requests to observe the reaction of the program in this case.

Why should the negative pressure test
Perhaps everyone is already familiar with a very famous search engine Google, we know, this search engine not only accurate search results, but also, the search speed is incredibly fast. The search result is accurate, that is the performance of the program algorithm in one aspect, the search speed is fast, it is related to the whole system component and the robust line of the program. If you want to write your own program can also be in the case of large traffic "leisurely", it is necessary to test the program negative pressure.
For websites or programs that have a large number of visits, in particular, to provide some of the more popular topic programs, preferably in the official site or program published before the relatively complete negative pressure test, and according to test even if the optimization program or reasonable configuration of the server hardware, so that the site does not increase the number of users in the case of embarrassing or even collapse.


Using Act for testing

ACT Introduction
ACT (or Msact) is a set of program-testing tools for Microsoft Visual Studio and Visual Studio.NET, and it's what we need for negative-pressure testing. Act not only can record the detailed data parameters of the program running, use the chart to display the program running condition, and the installation and use are simpler, the result reading is also very convenient, is a set of more ideal test tool.

Install Act
At the very least, of course we need visual studio,act to appear without a separate version. Here, we test the performance of a Web service in a high load situation. First, open Act in Visual Studio (figure)
--> -->
The
" The program prompts you to create a new project, click "Yes," and enter a text description that shows the following interface (Figure II):

After we open the Act, we can start testing.
To build a new test
Click the menu "Action"-> "New Test" (Figure III)

We are too familiar with the wizard, read the text of each interface carefully, select it.
Edit Test
After the above settings, the following interface appears (Figure V):

Obviously, the above interface we artificially divided it into three parts, and each part of the color is different. The above three parts of the different colors are:
Left blue section: Navigation bar, test entrance and result population;
Top Right GREEN: hint Information Bar;
Lower right red: VBS code bar, where the test needs to edit some of the VBS code, test success or not, all rely on the implementation of these code. So, this code is best considered and tested multiple times;
Before testing, set some of the test options (menu "Action"-> "Properties") as shown in Figure six

In the above interface, the main set of two parameters:
(1) Test duration setting, where the testing time is set, the default is 5 minutes;
(2) Set up some test performance data on the Counters label page;
After the above settings are complete, you can begin to modify the VBS code, we do not need to traverse the entire VBS code, only to see some of the main:
Test.sendrequest ("http://localhost/")
The above is the default code, which we can modify to the following code:
Test.sendrequest ("http://localhost/philipq/wsmessages/wsmsg.asmx/MPost?webKey=w2k&UName=Ad&UPassword= Pwd&uto=admin&umessage=act+test ")
The above code should be written according to the characteristics of its own procedures to modify to achieve the best test results.
Performing Tests
Click the "Start" button on the toolbar to start the test as shown below:

The above interface displays the time of the program test, the time remaining, the number of request submissions per second, the total number of request submissions, the amount of errors, and so on. Click on the button "Show Details" to view detailed data.
After the test is finished, you can view the results of the test.
Read the test results
After the test is complete, you can click on the result branch on the left side of figure two to view the test results, and in the report column on the right we can view the following data: OverView, Graphs, requests, etc., the following figure is an example of a OverView data:

As can be seen from the above report, the test program submits request23 times per second, totalling 1400 times.
Use of test results
Based on the results of the test, we can know the operation of the program, under the high load of the server's ability to withstand. Based on this data, we determine the performance of the program and the performance of the server, in order to predict what will happen after the formal use of the program and the server needs improvement.
Other options
The act described above is good, but after all, not every user uses visual Studio, we can consider other tools to test.
Microsoft Web Application Stress Tool (WAS)
This tool, like Act, is a Microsoft product, but the tool is not integrated with Visual Studio and can be used alone. It feels like the program is still being tested, but some of the basic features are already complete enough to perform almost all of the act, and was used simpler and more fully set. Another feature of this tool is that its report is a plain text file, not a popular HTML file format, but the content is not at all inferior.
More information about this tool can be found here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=e2c0585a-062a-439e-a67d-75a89aa36495&DisplayLang=en
Open System Testing Architecture (Opensta)
The feature of Opensta is that it can simulate many users to access the website that needs to be tested, it is a powerful, custom set of full-featured software, but, most of these settings need to be done through the script, so before you really use this software, you must learn its script writing. If you need to complete a complex function, script requirements are relatively high, of course, this is the advantage of some programmers do not care about these script.
This software is completely free and the source code can be downloaded, interested friends can modify themselves to meet the requirements.
More information about this tool can be found here:

http://www.opensta.org/

http://opensta.sourceforge.net/

Pureload
Pureload is a Java-based test tool whose script code uses XML entirely, so the code is simple to write and its test report contains text and graphics and can be exported as an HTML file. Because it is java-based software, you can use the Java Beans API to enhance software functionality.
More information about this tool can be found here:
http://www.pureload.com/
Qaload
Qaload not only test Web applications, but also test some background things, such as SQL Server, as long as it is supported by the protocol, can be tested, another point, qaload not only can test windows, but also can test AIX, HP-UX and Solaris systems. However, the software is very expensive.
More information about this tool can be found here:
http://www.compuware.com/products/qacenter/qaload/
LoadRunner
For big companies with deep pockets, the software may be more appropriate, and its functionality is comparable to that of Qaload, which is used by well-known companies such as IBM, SUN, and Oracle. But its price is also unattainable, and the function is proportional.
More information about this tool can be found here:
http://www-heva.mercuryinteractive.com/products/loadrunner/


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.