Share via


ASP .NET Unit Testing

The source code in an ASP.NET application executes in a slightly different environment than a traditional desktop-based application. Subtle differences - like the identity of the thread, permission to certain directories, and the default current directory - can affect the accuracy of the source code that you have written. Visual Studio Team System enables you to simulate these conditions with the attributes shown in Figure 1. These attributes tell the Visual Studio Team System testing infrastructure to host ASP.NET and execute your source code in that context. This allows you to test your code under real-world conditions, without the added overhead of deploying your web application beforehand.

Simulating the ASP.NET hosting environment