asp.net applications

Source: Internet
Author: User
Tags contains http request test web server visual studio
The asp.net| program user experience is essential to the success of a Web site, so it is important to ensure that each feature is appropriately functional. After all the defects have been resolved, the application must be tested in the product quality environment. The so-called product quality environment is an environment where the environment simulates the load expected after the application becomes a product.



There are a number of tools available for this type of testing, including Microsoft's application Center Test (ACT). Microsoft offers two ways to use Act, one as a standalone product, and the Visual Studio. NET Enterprise Edition also contains a version of Act. Let's take a closer look at how to use this tool to access a WEB application.

Get ACT
The ACT Stress test Web Server allows us to analyze the performance and scalability issues of Web applications. The ACT in Visual Studio. NET Enterprise Edition is not limited to testing applications built using ASP.net. For example, you can use it to test any type of WEB application, including Active Server pages (ASP), Java Server pages (JSP), and HTML.

ACT tests a Web application by simulating a large group of users and opening many connections to the Web server. A client connected to the server sends an HTTP request to the server. ACT allows us to specify the number of users/connections to simulate.

In addition to the standard HTTP protocol, ACT supports a variety of authentication schemes that can be used in WEB applications, including the popular Secure Sockets Layer (Ssl,secure Sockets Layer) protocol.

Note: The ACT is an installation option when you install Visual Studio. NET Enterprise Edition. Before you start creating tests, you should properly configure your test environment to ensure that you have reliable test results.



Microsoft provides the following guidelines for how to build a test environment that is used in the ACT product:

The test environment should contain only the development server or the test server.
Developers should minimize all network activity unrelated to the test. Also, avoid running multiple tests at the same time in the same test environment.
For a stress test, create enough WEB server loads to make the processor utilization at least 80%.
Use a fast network component to avoid using an HTTP proxy server. Stress testing relies on a growing level of load until the WEB server or application becomes a bottleneck, stopping the increase in load. If any part of the system is slower than a WEB server or application, it is not possible to measure the maximum capacity of the server or application. Increasing the load level will not solve the problem.


After the product is properly installed and the test environment is set up, we are ready to start creating and running the tests.

Creating Tests
After the ACT is installed, it can be used as a stand-alone tool and can also be used by Visual Studio. NET. If you want to use standalone mode, you can find it in the Visual Studio. NET Enterprise Features subdirectory of the Visual Studio. NET installation location. Also, Visual Studio. NET provides a new project type for ACT Projects. The functionality is the same in both ways, but staying in the familiar Visual studio. NET Workspace is a good choice. So I'll focus on using the Visual Studio. NET interface below.

The main component is the ACT project. You can create a new Act project in Visual Studio. NET by creating an item by using the ACT Project option. The ACT project file is an XML file with an. act extension. Additionally, in the project setup, Option is a description of a proxy server or port (if used). This is the value that we entered in the Properties window of the project.

You can add a test to your project by right-clicking the item and then selecting Add New item. The ACT installation consists of two test scripts (one is JScript, the other is VBScript), and an option for recording browser sessions. The final option is to test the application in as simple and straightforward a way as possible.

Once you have selected Browser Recorded Test, a window with the Start and Cancel buttons opens. The Start button starts the recording process by opening a new instance of Internet Explorer. All activities that occur in that instance of Internet Explorer will be recorded. After you finish, you can return to the Browser record window and select Stop. This allows us to select OK to save the test in the project or cancel the process. Select Save to generate a VBScript file that contains the script that records the test. You can learn more about the execution of ACT scripts by analyzing the system-generated scripts.

After the session stops recording, we can use it to test the application. In other words, we can use this session as a basis for testing the performance of the application. The test properties allow us to control the number of connections, tests, and so on. Here is a summary of the different test properties:

Iterations: The number of times the test will run.
RunTime: The time that the test will run.
Warmuptime: Tests the wait time before starting.
Connections: Test the number of connections that are emulated.
The test is actually performed through the test Drop-down menu, which appears in the menu bar when Visual Studio. NET is located on the ACT project. Use the Test menu to start and/or stop tests, and to view test results. The test results are displayed in the output pane of the Visual Studio. NET Workspace.

The Browser record test is only one of the many possible tests that ACT provides. The other basic tests in Act installation send only one HTTP to a specified address, but Act includes a wide range of object models that we can use to build fully-featured tests that use VBScript or JScript.


--------------------------------------------------------------------------------


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.