<p>Any suggestions?  Using visual studio in C#.</p>
<p>Are there any specific tools to use or methods to approach this?</p>
<h3>Update:</h3>
<p>Sorry, I should have been a little more specific. I am using ASP.Net 2.0 and was looking more for a tool like jUnit for Java. I took a look at NUnit and NUnitAsp and that looks very promising. And I didn't even know that Visual Studio Pro has a testing suite, so I'll look at all of these options (I've just started using Visual Studio/Asp.net/C# this summer).</p>

[{'answer_id': 4386, 'author': 'Brad Tutterow', 'author_id': 308, 'author_profile': 'https://Stackoverflow.com/users/308', 'pm_score': 6, 'selected': True, 'text': '<p>Boy, that\'s a pretty general question.  I\'ll do my best, but be prepared to see me miss by a mile.</p>\n\n<p>Assumptions</p>\n\n<ol>\n<li>You are using ASP.NET, not plain ASP</li>\n<li>You don\'t really want to test your web pages, but the <strong>logic</strong> behind them. Unit testing the actual .ASPX pages is rather painful, but there are frameworks out there to do it.  <a href="http://nunitasp.sourceforge.net/" rel="nofollow noreferrer">NUnitAsp</a> is one.</li>\n</ol>\n\n<p>The first thing to do is to organize (or plan) your code so that it can be tested.  The two most popular design patterns for this at the time seem to be MVP and MVC.  Both separate the <strong>logic</strong> of the application away from the <strong>view</strong> so that you can test the logic without the view (web pages) getting in your way.</p>\n\n<p>Either MVP or MVC will be effective.  MVC has the advantage of having a Microsoft framework <a href="http://www.asp.net/mvc/" rel="nofollow noreferrer">almost ready to go</a>.  </p>\n\n<p>Once you\'ve selected a framework pattern that encourages testability, you need to use a unit testing tool.  <a href="http://www.nunit.org/" rel="nofollow noreferrer">NUnit</a> is a good starting point.  Visual Studio Professional has a <a href="https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/bb385902(v=vs.90)" rel="nofollow noreferrer">testing suite built it</a>, but NUnit + <a href="http://www.testdriven.net/" rel="nofollow noreferrer">TestDrive.NET</a> also works in the IDE.</p>\n\n<p>That\'s sort of a shotgun blast of information.  I hope some if it hits.  The Pragmatic Bookshelf has a <a href="https://rads.stackoverflow.com/amzn/click/com/0974514020" rel="nofollow noreferrer" rel="nofollow noreferrer">good book covering the topic</a>.</p>\n'}, {'answer_id': 4399, 'author': 'Chris Farmer', 'author_id': 404, 'author_profile': 'https://Stackoverflow.com/users/404', 'pm_score': 2, 'selected': False, 'text': '<p>There was a screencast series a year or so ago on Polymorphic Podcast that did a pretty good intro walkthrough of an MVP implementation in ASP.NET.  Implemented this way, unit tests fall into place much more naturally.</p>\n\n<p><a href="http://polymorphicpodcast.com/shows/mv-patterns/" rel="noreferrer">http://polymorphicpodcast.com/shows/mv-patterns/</a></p>\n'}, {'answer_id': 31533, 'author': 'Frog', 'author_id': 3342, 'author_profile': 'https://Stackoverflow.com/users/3342', 'pm_score': 2, 'selected': False, 'text': '<p><a href="https://nunit.org/" rel="nofollow noreferrer">NUnit</a> is the way to go for you.\nYou could find some links here :</p>\n\n<ol>\n<li><a href="http://nunitasp.sourceforge.net/tutorial/" rel="nofollow noreferrer">http://nunitasp.sourceforge.net/tutorial/</a></li>\n<li><a href="https://www.hanselman.com/blog/NUnitUnitTestingOfASPNETPagesBaseClassesControlsAndOtherWidgetryUsingCassiniASPNETWebMatrixVisualStudioWebDeveloper.aspx" rel="nofollow noreferrer">NUnit Unit Testing of ASP.NET Pages, Base Classes, Controls and other widgetry using Cassini by Scott Hanselman</a></li>\n</ol>\n'}, {'answer_id': 31536, 'author': 'Joshua Turner', 'author_id': 820, 'author_profile': 'https://Stackoverflow.com/users/820', 'pm_score': 2, 'selected': False, 'text': '<p>Take a look at <a href="http://selenium.openqa.org/" rel="nofollow noreferrer">http://selenium.openqa.org/</a> it offers a good automated way to build unit tests hooking into the browser.  there is a nice firefox plugin for recording tests and can utilize almost any unit testing framework. We had a presentation/demo at our local user group meeting last month and it looked awesome.</p>\n'}, {'answer_id': 118572, 'author': 'Glenn Slaven', 'author_id': 2975, 'author_profile': 'https://Stackoverflow.com/users/2975', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WatiN</a> is the best that I\'ve found.  It integrates into Visual Studio unit testing or nunit &amp; you can do pretty much anything you need in the browser (click links, submit forms, look for text/images, etc.), plus it\'s written in .net so you don\'t need to have ruby installed (as you do for watir, which is an awesome tool none the less)</p>\n'}, {'answer_id': 223415, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>These frameworks are useful for <em>integration</em> testing, but they can\'t provide unit testing, that is, testing the View isolated from persistence, business logic, whatever. </p>\n\n<p>For <em>unit</em> testing Asp.Net Webforms, as well as MVC, you can use <a href="http://sm-art.biz/Ivonna.aspx" rel="noreferrer">Ivonna</a>. For example, you can mock your database access and verify that the mocked records are displayed in the datagrid. Or you can mock the membership provider and test the logged in scenario without having to navigate to the login page and entering your credentials, as with integration testing.</p>\n'}, {'answer_id': 1061827, 'author': 'RodH257', 'author_id': 126597, 'author_profile': 'https://Stackoverflow.com/users/126597', 'pm_score': 2, 'selected': False, 'text': '<p>Your best bet is separating the model logic from presentation and thoroughly unit testing the model with NUnit or similar. Testing the users interaction with the web page can be fiddly. </p>\n\n<p>If you actually do want to unit test the users interaction with the web page some of the afformentioned tools such as waitn seem good, an addition to that which I\'ve heard of is <a href="http://seleniumhq.org/" rel="nofollow noreferrer">Selenium</a></p>\n'}]
['https://Stackoverflow.com/questions/4363', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/396/']