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 (6)
  1. Thomas says:

    Excellent screencast! I like when its from scratch.. because sometimes its hard to understand the really basic stuff (like the fact that you are creating the unit tests from your existing project).

    Is there any high resolution version of the screencast?

  2. jeffnuck says:

    Thanks, I find this format is much easier to digest (not to mention saves me a log of typing :-).  

    I have a high resolution version of the screencast, but its about 22 mb; however you should be able to double-click the video/silverlight control for full screen mode.


  3. Martin Nyborg says:

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

  4. Shankar says:

    Great screencast.. helped me write unit tests cases very quickly.. Keep up the good wrok..


  5. Andy says:

    The window is so small… Hard to see the video

  6. jeffnuck says:

    Hi Andy,

    It’s a Silverlight Control, so all you have to do is double-click the window and it will go Full-Screen.



Comments are closed.

Skip to main content