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

來源:互聯網
上載者:User

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.