Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best tool for Test driven Development using asp.net 2.0? [closed]

We are using Asp.Net 2.0 and planning to move to TDD so that middle tier can be developed and tested while others in the team take care of UI and DataBase area.

Can anyone kindly let me know the pre-requisites for TDD and which one is the best tool for .net? Thanks...

[UPDATE]

Thanks everyone for your answers and help.

  • I was reading an article about TDD and ASP.NET and it said "ASP.NET is not very TDD-friendly and ASP.NET MVC framework is alternative way to build your application which is more testable than form=based application." Should I switch/change to ASP.NET MVC?

  • What book(s) do you recommend about TDD /Test?


1 Answers

Unit testing & mocking

I suggest you combine NUnit and Moq for object mocking. It will take more effort from you to do unit testing in a web forms application though.

  • NUnit is well established, alive project and widespread.
  • Moq on the other hand uses latest language capabilities, is easy to use and is also used by the community.

The thing is, you can't miss with these two.

Switch to MVC if early in the project

If you're in an early stage of the project I suggest you do switch to Asp.net MVC, because it will make your life lots easier with unit testing. But beware of the learning curve here, because MVC is not just a superset on Asp.net Web forms. It's a completely different paradigm and development platform. But I doubt you'll regret switching to it.

like image 51
Robert Koritnik Avatar answered Nov 26 '25 23:11

Robert Koritnik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!