views:

791

answers:

2

With more and more code pushed to the Views in Asp.Net MVC (i.e. AJAX, JQuery, etc...), how do you maintain the 'testability'?

  • How do you test your Views?
  • How do you test your views with client-side jscript code?
  • How do you test your Views with Async behavior?

It seems that most examples on the testability of MVC deal with controllers. What about Views?

+2  A: 

Selenium is a great tool for testing the front end of any web app. It is written in the browser's native language, JavaScript. Having the browser run the test framework code gives your tests the ability to expose browser incompatibility issues. It is free and open source.

Kyle Dyer
+1  A: 

Also see other free browser automation tools like ArtOfTest and WatiN. The Selenium stack can be a little complicated to set up.

David Laing