Freigeben über


Unit Tests with Visual Studio 2008 (screencast)

Test Driven Development (TDD) has long been advocated as a "best practice" in software development.  Without picking apart the details with this theory, I'll just summarize the concept:

  • prior to jumping in with both feet, writing functional code, start with stubbed out methods/functions/classes/etc... (you might use Class Designer for this part)
  • second, create a test harness that aligns with the functional requirements... these should test for "expected" results and compare them with "actual" results returned from the functional code (class/method/etc...)
  • finally start adding code to your stubbed classes/methods... and refining this code until your tests harness receives all "expected" results

Creating these test harnesses can be a cumbersome task and seem to take time away from the valuable development time.  Visual Studio can automate a majority of this for you saving you tons of time without bolt-on 3rd party tools, and most importantly recover that valuable development time "without" sacrificing quality code!

Instead of rambling, I recorded a quick 7 minute screencast to get you started in Unit Testing with Visual Studio 2008:

Note: This just touches the surface, but will hopefully prove a decent introduction.

Comments

  • Anonymous
    May 10, 2008
    The comment has been removed

  • Anonymous
    May 10, 2008
    The comment has been removed

  • Anonymous
    May 11, 2008
    I have silverlight beta 2 installed and as you know unable to install version 1. Is it possible to provide a download link?

  • Anonymous
    January 29, 2009
    Great screencast.. helped me write unit tests cases very quickly.. Keep up the good wrok.. Thanks

  • Anonymous
    April 22, 2009
    The window is so small... Hard to see the video

  • Anonymous
    April 23, 2009
    Hi Andy, It's a Silverlight Control, so all you have to do is double-click the window and it will go Full-Screen. Thanks, Jeff