Gallio和MbUnit在NAnt

时间:2009-11-25 15:46:21

标签: continuous-integration nant mbunit gallio ncover

我正在尝试使用Gallio(v3.1)/ MbUnit / NCover在我的C#代码中运行单元测试,作为我的持续集成系统构建过程的一部分。

我可以让Gallio.Echo.exe执行测试并输出一个XML文件(尽管它似乎确实检查了文件夹中的所有.dll文件==约6.5MB .xml文件!!)但是当我试图让NCover也链接起来,它会爆炸。

然后:我尝试使用说明from here来使用NAnt任务,例如:

<gallio result-property="testrunner.exit-code"   
                application-base-directory="bin/debug"   
                runner-type="NCover"    
                failonerror="false"    
                report-name-format="gallio-MyTestProject"    
                report-types="xml"    
                report-directory="bin/debug">   
                <runner-property value="NCoverArguments='//q //ea CoverageExcludeAttribute //a MyTestProject.dll'" />   
                <runner-property value="NCoverCoverageFile='coverage-MyTestProject.xml'" />
                <assemblies>  
                    <include name="bin/debug" />  
                </assemblies>  
            </gallio>

但是我的命令行出现以下错误:

Element Required! There must be a least one 'files' element for <gallio ... />.

我试图指定我想检查的.dll文件,但它仍然会出现此消息。任何建议都非常感谢!

1 个答案:

答案 0 :(得分:3)

<assemblies> has been changed<files>