单元测试之道

Nunit with VS2012:

构建单元测试步骤

1.下载Nunit 2.6.2,解压到某个path;

2.在VS2012 上构建自己的library工程;

3.添加引用:nunit.framework.dll;

4.添加UunitTest类:在该类中using nunit.framework.dll,编写测试代码;

5.属性->调试->启动外部程序:选择path->bin->nunit.exe(有32与64位之分);

6.VS2012 :生成(build)

7.启动(会自动启动Nunit.exe)

8.在Nunit界面:选择File->Open Porject:选择生成的exe或者dll

9.点击run.....

原文地址:https://www.cnblogs.com/Alvin-x/p/3386219.html