2010-11-04 30 views
1

我想將NCover集成到我的CC.net版本中。我跟着一篇文章,我發現這裏http://csut017.wordpress.com/2009/05/29/improved-ncover-integration/,我幾乎遵循逐字,除了我們使用xUnit而不是nUnit爲我們的單元測試。問題是NCover永遠不會在構建服務器上運行這個配置,我想知道是否有其他人有一些這方面的經驗,並可以給我一些建議。需要幫助將NCover 3.4整合到CruiseControl.Net 1.5與xUnit 1.6.1

下面是我的ccnet.config文件的相關部分。配置的<msbuild>部分運行我們的單元測試,這些測試已經在proj文件中正確配置。

<msbuild> 
    <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe</executable> 
    <workingDirectory>c:\projects\win_wip\src\Core.Tests</workingDirectory> 
    <projectFile>Core.Tests.csproj</projectFile> 
    <buildArgs>/noconsolelogger /p:configuration=debug</buildArgs> 
    <targets>Test</targets> 
    <timeout>900</timeout> 
    <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger> 
</msbuild>    

<ncoverProfile> 
    <executable>c:\program files\ncover\ncover.console.exe</executable> 
    <program>C:\Projects\win_wip\lib\xunit-1.6.1\xunit.console.clr4.x86.exe</program> 
    <testProject>DomainModel.Tests.dll</testProject> 
    <workingDir>c:\projects\win_wip\src\domainmodel.tests\bin\debug</workingDir> 
    <includedAssemblies>domainmodel.*.dll</includedAssemblies> 
</ncoverProfile> 

<ncoverReport> 
    <executable>C:\Program Files\NCover\NCover.Reporting.exe</executable> 
    <outputDir>ncover\reports</outputDir> 
    <reports> 
     <report>FullCoverageReport</report> 
    </reports> 
    <sortBy>CoveragePercentageDescending</sortBy> 
</ncoverReport> 
+0

您可以查看ccnet日誌(在CCNETDir \ server \ logs中)以查找更多信息。 – 2010-11-04 17:49:38

+0

我看過日誌... NCover從來沒有真正運行..我甚至看到與進程資源管理器的機器和ncover.console.exe永遠不會在構建過程中觸發。 – Snarfblatt 2010-11-04 19:02:20

回答

0
+0

我沒有修改我的msbuild,因爲在我們的本地開發機器上,我們不使用NCover(我們使用dotCover),所以我不想在那裏添加NCover特定的配置。 – Snarfblatt 2010-11-04 17:19:47

+0

我確實以這種方式使用了NCover。顯然,我試圖包含ncover的方式在cc.net中還不夠用。 – Snarfblatt 2010-11-30 17:12:24