Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News ASP.NET MVC Testing Tips and Tricks

ASP.NET MVC Testing Tips and Tricks

This item in japanese


There are several components in an ASP.NET MVC 3 web app – models, controllers, route-handlers, views, html-helpers, client-side code etc. Most of these can be unit-tested, others need integration tests, and several good practices can help you keep your tests more maintainable and avoid making them brittle.

Here are some resources -

Do you have any other testing tips you want to share for testing ASP.NET MVC applications?

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • One Suggestion: SpecsFor.Mvc!

    by Matt Honeycutt,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I'm obviously biased, but I think you left out one of the best tools for testing ASP.NET MVC applications: SpecsFor.Mvc! It enables you to write acceptance tests that perform complex browser automation using simple, unit-test like syntax. You can check it out at and on my blog at

  • Re: One Suggestion: SpecsFor.Mvc!

    by Roopesh Shenoy,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Thanks for the suggestion Matt - definitely looking at it.

    One concern I have is how do you reuse these test-steps? One of the greatest features in BDD frameworks seems to be that you can reuse your test steps in multiple test cases making them more efficient. Look here for instance -

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p