Blog

  • Home /
  • Blog /
  • The Underlying Problems of TDD in the .NET World

The Underlying Problems of TDD in the .NET World

March 8, 2007

This post of Jeremy D. Miller hits it right on the head: 

In .NET development, and especially ASP.NET WebForms development, you often have to go out of your way to create testable code.

Also see my earlier post about What's wrong with ASP.NET. I'm also glad and pleasantly surprised that Scott Guthrie joined the discussion (read the comments). You should definitely read his comment as it contains lots of useful information.

ScottGu mentions the Plasma project on CodePlex.

It allows you to create an ASP.NET application in-memory (without requiring a web-server or a separate process), and allows you to simulate http requests to ASP.NET (effectively mocking HttpContext objects through the pipeline).

Why isn't this project discussed all over blogging land? When you read the Weblogs@ASP.NET the last couple of days, there are like a thousand announcements that the new CTP of Visual Studio Orcas is available, but nothing about Plasma. Something to have a closer look at!

ScottGu also recommends using WatiN for integration tests. Very interesting as this is also an open-source project ;-).

What it all comes down to is the fact that applying presentation patterns (like Passive View, Model View Controller, ... etc.) is somewhat awkward with the current versions of ASP.NET and it's code-behind / event model. What I would like to see in the next version of Visual Studio is that you have no other option than to separate your code into a view and a presenter/controller (and add some more testability options while they're at it). I very much like the approach of MonoRail and I hope that it will soon get the credits it deserves. 

Again I'm glad that a smart guy like ScottGu appeared on the stage and hopefully he will make a difference.

If you and your team want to learn more about how to write maintainable unit tests and get the most out of TDD practices, make sure to have look at our trainings and workshops or check out the books section. Feel free to reach out at infonull@nullprincipal-itnull.be.

Profile picture of Jan Van Ryswyck

Jan Van Ryswyck

Thank you for visiting my blog. I’m a professional software developer since Y2K. A blogger since Y2K+5. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Past organizer of the European Virtual ALT.NET meetings. Thinking and learning about all kinds of technologies since forever.

Comments

About

Thank you for visiting my website. I’m a professional software developer since Y2K. A blogger since Y2K+5. Author of Writing Maintainable Unit Tests. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Thinking and learning about all kinds of technologies since forever.

Contact information

(+32) 496 38 00 82

infonull@nullprincipal-itnull.be