Resharper unitrun isFreeAdd-in for Microsoft Visual Studio 2005 that allows you to automatically run and profile unit tests.
1)Download resharper unitrunFrom the link below:
Http://www.jetbrains.com/unitrun/download/index.html
2)Get a free license,
Http://www.jetbrains.com/unitrun/download/registration.html
3)Install the software
After installed the software, restart your vs2005.a register window form will appear in the DOTNET. skip it. the another window form ask you enther the user name and key, input your license. then press submit.
4)Download nunit or csunit
Resharper unitrun must be used together with nuint or csunit.
You can get them from the link below:
Http://sourceforge.net/
5)Install nunit
6)Create a project for test
A: Create a project with name of "nunittest ";
B: Add reference nunit. Framework (nunit setup path/bin/nunit. Framework. dll)
C: create a "numberfixture ",
Using system;
Using system. Collections. Generic;
Using system. text;
Using nunit. Framework;
Namespace nunittest
{
[Testfixture]
Public class numbersfixture
{
[Test]
Public void addtwonumbers ()
{
Int32 A = 1;
Int32 B = 2;
Int32 sum = A + B;
Assert. areequal (sum, 2 );
}
}
}
7)Change property of the project nunittest
A. Click "VS2005-Project-Property ";
B. Change: Start action -- start external program: nunit setup path + "/bin/nunit-gui.exe"
8)Debug this project.
9)Start nunit
A. Open project: "file-open Project", select "nunittest. dll" from server. mappath ("bin ");
B. Click "run ".
If the processbar is green, OK. Red Bar means that there are somemistaks. Yellow means? Sorry, I don't remember.
10)Restart vs2005, You will see a green tag on the left of code area.
11)Click the tag Image