BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

ASP.NET MVC Testing Tips and Tricks

| by Roopesh Shenoy on Mar 20, 2012. Estimated reading time: 1 minute |

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

Adoption Stage
Style

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.

Tell us what you think

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

Email me replies to any of my messages in this thread

One Suggestion: SpecsFor.Mvc! by Matt Honeycutt

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 specsfor.com/SpecsForMvc and on my blog at trycatchfail.com/blog/post/Using-SpecsForMvc-In....

Re: One Suggestion: SpecsFor.Mvc! by Roopesh Shenoy

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 - nbehave.codeplex.com/wikipage?title=Using%20NBe....

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT