Testing your ASP.NET application
Takeaway: Microsoft's Application Center Test (ACT) is a tool that allows you to test your Web applications. Find out how to establish a test environment and create a test with the ACT product.
User experience is imperative to a Web site's success, so ensuring the proper functionality of each feature is important. Once you remove all bugs, you must test the application in a production quality environment. That is, an environment that simulates the load you expect once a developer moves the application into production.
There are many tools available for such testing, including Microsoft's Application Center Test (ACT). It's available as a stand-alone product, and Visual Studio .NET Enterprise Edition includes a version of ACT. Let's take a closer look at using this tool to assess a Web application.
Get your ACT together
ACT stress tests Web servers, allowing you to analyze performance and scalability problems with Web applications. The inclusion of ACT with Visual Studio .NET Enterprise Edition doesn't limit it to testing ASP.NET-based applications. For instance, you may also use it to test any type of Web application including Active Server Pages (ASP), Java Server Pages (JSP), and HTML.
ACT tests the Web application by simulating a large group of users and opening multiple connections to the Web server. The connected clients send HTTP requests to the server. ACT allows you to specify the number of users/connections to simulate.
In addition to the standard HTTP protocol, ACT supports various authentication schemes that you may utilize within a Web application; this includes the popular Secure Sockets Layer (SSL) protocol.
Note: ACT installs as a setup option when installing Visual Studio .NET Enterprise Edition. Before we begin creating tests, you should properly configure the test environment to ensure reliable test results.
Testing environment
Microsoft provides the following guidelines for establishing a test environment for use within the ACT product:
With the product properly installed and your test environment set up, we're ready to begin creating and running tests.
Creating a test
Once you install ACT, you can utilize it as a stand-alone tool or via Visual Studio .NET. With the stand-alone option, ACT is available via the Visual Studio .NET Enterprise Features subfolder of the Visual Studio .NET location. Also, a new project type of ACT Projects is available in Visual Studio .NET. Both options provide the same functionality, but staying in the familiar Visual Studio .NET workspace is a nice option. I'll focus on using the Visual Studio .NET interface.
The main component is the ACT project. You create a new ACT project in Visual Studio .NET by creating a new project using the ACT Project option. The ACT project file is an XML file with the .act file extension. With the project in place, you may add tests to it. Also, on project setup, Option is the specification of a proxy server and port (if used). This is what you enter in the project's Properties window.
You may add a test to the project by right-clicking on the project and selecting Add New Item. The ACT installation includes two test scripts (one in JScript and another in VBScript), and one option for recording a browser session. This last option is the most straightforward method to be testing your application as soon as possible.
Once you select the Browser Recorded Test, a window opens with the Start and Cancel buttons. The Start button begins the recording process by opening a new instance of Internet Explorer. All activity within that instance of Internet Explorer is recorded. When it finishes, you may return to the Browser Record window and select Stop. This allows you to select OK to save the test in your project or Cancel the process. Selecting Save generates a VBScript file containing the script for the recorded test. You can learn a lot about ACT scripting by examining the script generated by the system.
Once the session stops recording, you may use it to test your application. That is, you may use the session as the basis for testing application performance. Test properties allow you to control the number of connections, tests, and so forth. Here's an outline of the various available test properties:
The test actually executes via the Test drop-down menu, which is available when inside an ACT project. The menu allows you to start and/or stop the test, as well as view the test results. The test results appear in the output tab of the Visual Studio .NET workspace.
The Browser Record test is just one of the many testing possibilities available with ACT. The other basic tests that come with the ACT installation only send an HTTP request to a specified address, but ACT includes an extensive object model that you may utilize to build full-featured tests using either VBScript or JScript.
TechRepublic's free .NET newsletter, delivered each Wednesday, contains useful tips and coding examples on topics such as Web services, ASP.NET, ADO.NET, and Visual Studio .NET. Automatically sign up today!
Print/View all Posts Comments on this article
SponsoredWhite Papers, Webcasts, and Downloads
- Live Webcast: Reduce Your Costs and Prepare for Tomorrow with BMC CONTROL-M BMC Software
- Exchange Server 2007: What To Expect Global Knowledge
- Eleven Myths about 802.11 Wi-Fi Networks Global Knowledge
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

Harnessing the power of waves
Planting solar gardens
Fill your car for $1.10 a gallon?
