Vadim's Weblog

Never stop learning.

TestDrivet.NET is the most usefull tool in Visual Studio.

Posted by Vadim on May 29, 2007

I’ve been using TestDriven.NET for more than year. And I have to tell you that it’s probably the most useful tool for me. To be able to Run Test(s) or Build the project just by right clicking on the source code is time saving.

Let’s look at the test fixture bellow.

namespace MyFixtures 
{ 
   [TestFixture] 
   public class FixtureOne 
   { 
      [Test] 
      public void Test1()   
      { 
         Assert.IsTrue(true); 
      }  

      [Test] 
      public void Test2() 
      { 
         Assert.IsTrue(true); 
      }  

      [Test] 
      public void Test3() 
      { 
         Assert.IsTrue(true); 
      } 
  } 
} 

Here are some thing I learned just by trying.

This one is probably obvious.

Click right button inside Test1 method and choose Run Test(s), only Test1 test will be run.

Here are some things that took me awhile to discover:

Click right button just bellow public class FixtureOne, and all three tests, Test1, Test2, and Test3, will be run.

Click right button just bellow namespace MyFixtures, and all the tests for MyFixtures namespace will be run.

I build my projects now jut by clicking right button on the source file and select Build. I just wonder why Microsoft doesn’t add build command in Visual Studio context menu.

How cool to have Reflector in your context menu. I mostly use it by expanding References in Solution Explorer clicking right button on the reference I want to reflect; something like System.Data for instance. It loads that assembly just by clicking on Go To Reflector item in the context menu.

And it’s not all. I’m sure there are many ways you’re using this tool that I haven’t discovered yet. Share with me, I want to learn from you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: