ReSharper UnitRun (feed add-in unit-test software)

ReSharper UnitRun is a free add-in for Microsoft Visual Studio 2005 that allows you to automatically run and profile unit tests.

1)Download ReSharper UnitRun from 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值