[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

How do I unit test web pages/sites in Visual Studio 2008?

I am a newbie to automated unit tests. We develop web stuff in VB using Visual Studio 2008. I have recently become convinced of the benefits of Test Driven Development and so would like to learn how to do this. I am aware that NUnit is an option but it would seem more sensible to use the stuff built into VS. I understand how to target unit tests at classes in *.vb files but I can't find any info anywhere as to how to target tests at web pages and their code behind (aside from using 'macro' records like Selenium). The best I have found is www.geekzone.co.nz/vs2008/4819 but this doesn't really get me very far.
Can anyone give me solid examples or point me at a tutorial?
In the first instance I would like to create a unit test to fail, then create a simple aspx web page with, say, a button and some code behind, and instantiate this into the unit test to then pass the test.
1 Solution
Please take a look at the following link.

Unit Testing ASP.Net Applications with Visual Studio 2008
Just a reminder. You need to have Visual Studio 2008 Team Suite or Test Edition to have the "test" menu appear in VS2008.
ddl_ex5Author Commented:
Exactly what I've been googling for for days!! Thanks.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now