I wondered if anyone had links or comments on strategy as regards to testing a webforms application, I am referring specifically to automated testing practices, and unit testing.
My current strategy has been to separate business logic into a separate DLL that can be Unit tested on a class by class basis. However when it comes to testing the web Forms themselves using code UI tests, it appears I should be running two instances of visual studio 2010, one for the application and the other in order to run the created UI tests.
I found this link:
Testing ASP.NET webforms applications
However while this link was interesting it does not answer my question with regard to a strategy on a green fields project.
Although MVC3 would solve some of this, part of my reason for sticking with webforms is that I am slowly migrating aspects of a legacy system and to start from scratch on everything, when I can migrate strategic parts does not make sense.
Any links comments or observations would be welcome. Thanks.
1 You can try with Selenium if you want just test your interfaces
http://seleniumhq.org/
2 On functionnal subject (Code behind) It’s very difficult to test because you must mock your pipeline, when i compare to MVC.
So for example you can mock HttpContextBase