Hi,
The MVC allows you, out of the box, to test controllers' logic, but not the client part.
I believe you can access your ViewData from unit tests (I assume via return value, but let other guys tell how). You don't have to render HTML to do so.
If you haven't watched video series from Rob Conery I'd recommend you to do it. All 9 videos (as for now).
What do you really want to test?
- Client's experience? Use tools I mentioned.
- Data passed to View? It should easy, just look around it. (I'm not using MVC - just follow what's happening around).
- Just make sure pages are not broken? I don't know a solution for now.
Why do you want to render the HTML in unit tests? You should understand that it might not always be possible. For example, how can HTML be rendered if the page accesses HttpContext ("classic" one, that lives in System.Web) that is not available in unit tests.
Cheers,
Dmitriy.