I was wondering the same thing. I can come up with a few basic things to check, for example:
- HTML is correctly / correctly formed
- The page title (<title> / <h1>) matches the title from the model
- The model body is displayed on the page.
- Proper CSS / Javascript enabled
- Important links are displayed correctly (paging / purchase / additional information)
- Performance (if you have models with a lazy loader, you may experience performance problems that you might notice only if the code in the views lists / processes the data)
In a small application, this probably does not add much value. However, in a large application, testing the views can be useful to ensure that the changes are not broken as other changes are made (despite all efforts to remove all things, itβs not unusual to break something that you think , you never made changes to!).
I think you could come up with some important tests to ensure important things in your application, but you could really catch things that would be really obvious with a very quick manual test (or even caught during dev). Some may think about it, I think it depends on the application / team.
Previous experience has taught me that maintaining tests against an ever-changing user interface sucks (and if it doesn't change often, tests won't bring much meaning). At my last company, we spent so much time trying to fix tests that were broken by application updates, we were unable to add new tests (although this was partly due to the (crappy but expensive) software we used - Mercury QuickTest). Tests written in C # are likely to be more maintainable, but you still need to really weigh the maintenance work and the benefits you get from the tests.
source share