I would like to use WatiN to test the functionality of a website I'm developing. Ideally, I would programmatically deploy the website (asp.net MVC3) before the tests start running, and then refresh the data before each test. Is this possible?
Testing ASP.NET site using WatiN. Is it possible to programmatically deploy an ASP.net site locally?
Asked
Active
Viewed 225 times
1 Answers
1
Read here about using MSBuild to deploy web projects. Getting your application into automated deploy on build success (read: Continuous Integration) is really nice.
MSBuild - How to use MSBuild to deploy an ASP.NET MVC application
Using NUnit, for refreshing the data before each test you can decorate a method with [Setup] (or [TestFixtureSetup]) to run code once before each test (or once before each group of tests). I use this for cases that require specific data setup and it works like a champ. I'm assuming other XUnit frameworks have similar mechanisms in place.