title: Integrating Automated Web Testing Into Build Process
body: <p>I'm looking for suggestions to improve the process of automating functional testing of a website. Here's what I've tried in the past.</p>
  
  <p>I used to have a test project using <a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WATIN</a>. You effectively write what look like "unit tests" and use WATIN to automate a browser to click around your site etc.</p>
  
  <p>Of course, you need a site to be running. So I made the test actually copy the code from my web project to a local directory and started a web server pointing to that directory before any of the tests run.</p>
  
  <p>That way, someone new could simply get latest from our source control and run our build script, and see all the tests run. They could also simply run all the tests from the IDE.</p>
  
  <p>The problem I ran into was that I spent a lot of time maintaining the code to set up the test environment more than the tests. Not to mention that it took a long time to run because of all that copying. Also, I needed to test out various scenarios including installation, meaning I needed to be able to set the database to various initial states.</p>
  
  <p>I was curious on what you've done to automate functional testing to solve some of these issues and still keep it simple.</p>
  
  <p><strong>MORE DETAILS</strong>
  Since people asked for more details, here it is. I'm running ASP.NET using Visual Studio and Cassini (the built in web server). My unit tests run in MbUnit (but that's not so important. Could be NUnit or XUnit.NET). Typically, I have a separate unit test framework run all my WATIN tests. In the AssemblyLoad phase, I start the webserver and copy all my web application code locally.</p>
  
  <p>I'm interested in solutions for any platform, but I may need more descriptions on what each thing means. :)</p>