English 中文(简体)
通过与全国通讯网的NCover 联系
原标题:Running NUnit via NCover with NANT

我的单位测试正在进行之中,并撰写了报告,但报道报告却空洞。 使用:

<target name="unitTests">
    <foreach item="File" property="filename">
        <in>
            <items>
                <include name="**UnitTestBinaries*.UnitTests.*.dll"></include>
            </items>
        </in>
        <do>
            <exec program="${ncover-console}" 
                  workingdir="${path::get-directory-name(filename)}" 
                  commandline="&quot;${nunit-console}&quot; ${filename} /xml:${project::get-base-directory()}\_nunit_${path::get-file-name-without-extension(filename)}.xml /nologo //x ${project::get-base-directory()}\_ncover_${path::get-file-name-without-extension(filename)}.xml" 
                  failonerror="true"
                  verbose="true"/>
        </do>
    </foreach>
</target>

我为什么不获得覆盖面数据? 实现这一步骤是否有任何便利?

感谢任何帮助。

<><>Edit>:

这是一个例子:

<!-- saved from NCover 3.0 Export url= http://www.ncover.com/  -->
<coverage profilerVersion="3.3.0.6070" driverVersion="3.3.0" exportversion="3" viewdisplayname="" startTime="2011-10-31T23:27:33.3688015Z" measureTime="2011-10-31T23:27:36.1420615Z" projectName="" buildid="d3a76074-bb16-4677-8273-91c7b6552066" coveragenodeid="0" failed="false" satisfactorybranchthreshold="95" satisfactorycoveragethreshold="95" satisfactorycyclomaticcomplexitythreshold="20" satisfactoryfunctionthreshold="80" satisfactoryunvisitedsequencepoints="10" uiviewtype="TreeView" viewguid="C:\_documentsCI\_ncover_XTFL.UnitTests.Core.xml" viewfilterstyle="None" viewreportstyle="SequencePointCoveragePercentage" viewsortstyle="Name">
  <rebasedpaths />
  <filters />
  <documents>
    <doc id="0" excluded="false" url="None" cs="" csa="00000000-0000-0000-0000-000000000000" om="0" nid="0" />
  </documents>
</coverage>

www.un.org/Depts/DGACM/index_spanish.htm Edit II:

这是建筑工程产出的样本(用于安全):

<task name="ncover">

                <message level="Info"><![CDATA[Command: C:Program FilesNUnit 2.5.10in
et-2.0
unit-console.exe]]></message>
                <message level="Info"><![CDATA[Command Args: C:\_documentsCIWorkingUnitTestBinariesXTFL.UnitTests.Workflow.dll /xml:C:\_documentsCI\_nunit_XTFL.UnitTests.Workflow.xml /nologo /noshadow]]></message>
                <message level="Info"><![CDATA[Working Directory:]]></message>
                <message level="Info"><![CDATA[Assemblies: (All Loaded Assemblies)]]></message>
                <message level="Info"><![CDATA[******************* Program Output *******************]]></message>
                <message level="Info"><![CDATA[ProcessModel: Default    DomainUsage: Single]]></message>
                <message level="Info"><![CDATA[Execution Runtime: Default]]></message>
                <message level="Info"><![CDATA[..........]]></message>
                <message level="Info"><![CDATA[Tests run: 10, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.9677115 seconds]]></message>
                <message level="Info"><![CDATA[Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0]]></message>
                <message level="Info"><![CDATA[***************** End Program Output *****************]]></message>
                <message level="Info"><![CDATA[Execution Time: 2.8983 s]]></message>
                <message level="Info"><![CDATA[Coverage Xml: C:\_documentsCI\_ncover_XTFL.UnitTests.Workflow.xml]]></message>
                <duration>3278.1105000000002</duration>
              </task>
最佳回答

如果贵国的NCover执照允许,建议升级为3.4.18。

仅凭这些讯息,它就认为,从来不开始在贵尼特进程上进行特征分析。

I can t see the exact command line syntax from the NAnt task, but NCover has to start NUnit in order to profile the unit test DLL.

如果NCover正在成功地启动NUnit公司,那么,在“Program Output”之后,你应当看到一个信息,即“Process nunit-agent [PID 3116]已开始在Unit测试结果之前进行定性分析”,在“Process nunit-agent [PID 3116]完成了定性分析”结果之后又发出另一个信息。

问题回答

我记得存在同样的问题。 是否将有关<代码>.pdb的档案加起来? 这给我解决了。

这是一个好的预兆:巴非银行档案,但即使没有这些档案,你也应当得到分支机构的覆盖,尽管你们赢得了任何象征。





相关问题
Create directory using Nant

Not sure if I m just totally missing it but I couldn t not figure out how to create a new directory using Nant. Is there built in functionality to do this? Can I just use the command prompt? I tried ...

Setting write permissions on godaddy hosting

I have godaddy asp.net hosting. Every time I upload the build, it’s a manual laborious task of setting write permissions (to folders) through the web interface. Is this any way to automate this ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

Gallio and MbUnit in NAnt

I am trying to use Gallio (v3.1)/MbUnit/NCover to run a unit test in my C# code, as part of the build process for my continuous integration system. I can get Gallio.Echo.exe to execute the tests and ...

TeamCity NUnit test result visualisation

Is there any way to produce visual results of NUnit tests from within TeamCity s "Tests" tab, currently my NAnt script outputs an .xml file of the results using the following task: <nunit2 ...

building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

热门标签