您的位置:首页 > 运维架构

SharpDevelop2.2与NCover-1.5.8的整合

2008-01-06 21:21 387 查看
SharpDevelop2.2与NCover-1.5.8的整合
陈能技
2008-1-6
 

 

首先下载并安装SharpDevelop2.2,版本号为2.2.1.2648 。下载地址:
http://www.sharpdevelop.com/OpenSource/SD/Download/
 

然后下载并安装NCover-1.5.8,下载地址:
http://www.ncover.com/download/discontinued
Ncover目前已经转向商业化,但是仍然提供1.5.8版本以前的旧版本的下载。NCover的网站上是这样说的:
Because NCover has been free of charge (albeit in pre-release status) for an extended period of time, we've decided to continue to make these downloads available to the developer community. Gnoso does not offer support for discontinued versions of NCover. Gnoso also does not make any guarantees or warranties concerning such unsupported software.

 

安装NCover-1.5.8 Beta版本时,发现安装目录不能选择,只能接受默认安装目录(C:/Program Files/NCover)
 

打开SharpDevelop,选择“Tools | Options | Tools | Code Coverage”,在NCover Configuration的Command中选择NCover安装目录下的“NCover.Console.exe”(C:/Program Files/NCover/NCover.Console.exe)。

 

以代码覆盖率的方式运行单元测试,可通过在测试方法中点右键,选择“current method | unit tests | run with code coverage”运行,也可通过选择“View | Tools | Unit Test”,在出现的“Unit Test”管理界面中选择“run with code coverage”运行。
 

运行后,在“code coverage”界面出现测试代码覆盖率结果,在代码中用红色标注未覆盖到的代码行,用绿色标注已覆盖的代码行。

 

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息