C# Unit Testing

English today....

 

I have recently started using NUnit testing framework.

It is just lovely! I am not too familiar with "Test First" but I love this.

 

Here are some tips to start with.

 

1.Download NUnit (Of course!)

http://www.nunit.org/

 

2.Install it. (of course...isn't it??)

 

3.Create an external tool entry

  Menu [Tools] - [External Tools...]

  Then entry as below.

     Title : NUnit (Too obvious??)

     Command : C:\Program Files\NUnit 2.5.4\bin\net-2.0\nunit.exe (you may need to midify this accordingly to your configuration.

     Arguments : /run $(ProjectDir)/$(ProjectFileName)

     (with /run option, it will start testing automatically. Here you can also specify which build to test, default is "debug" but if you give an option "/config:Release", then it will start testing with release build.)

 

4.Additional option to the project

 you can set VS to start the test whenever you build the project.

"C:\Program Files\NUnit 2.5.4\bin\net-2.0\nunit-console.exe" "$(TargetPath)"