Writing ASP.NET Hosted Unit Tests

You can choose to have your unit tests hosted and run inside of ASP.NET instead of the default VSTest host process. This is useful if you’re writing tests that work with ASP.NET objects such as Page and Session. You might want to test a Web service or some other application logic specific to your web interface. In either case, you have the option to host your ASP.NET unit tests in either IIS or the Visual Studio development server. Doing so ensures your test has full access to the ASP.NET environment variables.

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.