3

我正在尝试使用内置的 NUNIT 和捆绑的 dotCover 配置 TeamCity 6.5。由于我不明白 dotCover Merge 命令失败的原因,以及所有带有一些非零退出代码的后续命令。

在 64 位机器上使用 Nunit 2.5.10、x64,nunit 使用 .NET4.0 运行时。我选择 dotCover 作为覆盖工具,留空以使用内置的 dotCover,我的过滤器如下所示:

+:BSF
-:Aspose.Cells
-:BSF.UnitTest
-:BSF.IntegrationTests
-:DataAnnotationsExtensions.ClientValidation
-:DataAnnotationsExtensions
-:Elmah
-:FluentNHibernate
-:Iesi.Collections
-:NHibernate
-:Ninject
-:NLog
-:nunit.framework
-:nunit.mocks
-:pnunit.framework
-:Rhino.Mocks
-:WebActivator
-:Yahoo.Yui.Compressor

这是构建日志:

    Step 2/2] Coverage session finished [2/19/2012 5:16:06 PM]
[17:16:06]: [Step 2/2] Coverage results post-processing started [2/19/2012 5:16:06 PM]
[17:16:06]: [Step 2/2] Coverage results post-processing finished [2/19/2012 5:16:06 PM]
[17:16:06]: [Step 2/2] ##teamcity[importData type='dotNetCoverage' tool='dotcover' file='C:\System\TeamCity\Agent007\temp\buildTmp\tmpEB31.tmp']
[17:16:06]: [Step 2/2] Importing data from 'C:\System\TeamCity\Agent007\temp\buildTmp\tmpEB31.tmp' with 'dotNetCoverage' processor
[17:16:06]: [Step 2/2] Process exited with code 0
[17:16:06]: Waiting for 1 service processes to complete
[17:16:06]: Processing 1 coverage report(s)
[17:16:06]: Generating coverage report by dotcover for files: [C:\System\TeamCity\Agent007\temp\buildTmp\tmpEB31.tmp]
[17:16:06]: Get dotCover version (1s)
[17:16:08]: [Get dotCover version] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe version C:\System\TeamCity\Agent007\temp\buildTmp\dotCover1818874175934681230Version
[17:16:08]: [Get dotCover version] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

[17:16:08]: [Get dotCover version] dotCover exited with code: 0
[17:16:08]: Use DotCover 1.1.x commands set
[17:16:08]: Merge dotCover reports (3s)
[17:16:11]: [Merge dotCover reports] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe merge C:\System\TeamCity\Agent007\temp\buildTmp\dotcover3528224551281727042.xml
[17:16:11]: [Merge dotCover reports] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

[17:16:11]: [Merge dotCover reports] dotCover exited with code: -1073740940
[17:16:11]: [Merge dotCover reports] dotCover returned non-zero exit code.
[17:16:12]: Remove dotCover snapshot files
[17:16:12]: [Remove dotCover snapshot files] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe delete C:\System\TeamCity\Agent007\temp\buildTmp\dotcover2466421969996709368.xml
[17:16:12]: [Remove dotCover snapshot files] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

[17:16:12]: [Remove dotCover snapshot files] dotCover exited with code: 0
[17:16:12]: Generate dotCover report (3s)
[17:16:16]: [Generate dotCover report] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe report C:\System\TeamCity\Agent007\temp\buildTmp\dotcover1373956647492282113.xml
[17:16:16]: [Generate dotCover report] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

[17:16:16]: [Generate dotCover report] dotCover exited with code: -1073740940
[17:16:16]: [Generate dotCover report] dotCover returned non-zero exit code.
[17:16:16]: Generate dotCover HTML report
[17:16:16]: Packing snapshot files (3s)
[17:16:20]: [Packing snapshot files] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe zip C:\System\TeamCity\Agent007\temp\buildTmp\dotcover128074978195207834.xml
[17:16:20]: [Packing snapshot files] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

[17:16:20]: [Packing snapshot files] dotCover exited with code: -1073740940
[17:16:20]: [Packing snapshot files] dotCover returned non-zero exit code.
[17:16:20]: Remove dotCover snapshot files
[17:16:21]: [Remove dotCover snapshot files] Started dotCover: C:\System\TeamCity\buildAgent\tools\dotCover\dotCover.exe delete C:\System\TeamCity\Agent007\temp\buildTmp\dotcover1456730463762641811.xml
[17:16:21]: [Remove dotCover snapshot files] Output: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2012 JetBrains s.r.o. All rights reserved.

Failed to obtain source files for the 'delete' command. File 'C:\System\TeamCity\Agent007\temp\buildTmp\dotCover9185619990474525744Merge' is nor a snapshot in supported format, nor a coverage results descriptor
[17:16:21]: [Remove dotCover snapshot files] dotCover exited with code: -2
[17:16:21]: [Remove dotCover snapshot files] dotCover returned non-zero exit code.
[17:16:21]: No statistics values are provided by dotCover report generator
[17:16:21]: Publishing artifacts
[17:16:21]: [Publishing artifacts] Paths to publish: [C:\System\TeamCity\Agent007\temp\buildTmp\coverage1694097105968668380zip\CoverageReport.xml=>.teamcity/.NETCoverage]
[17:16:21]: [Publishing artifacts] Sending files
[17:16:21]: Publishing internal artifacts
[17:16:21]: [Publishing internal artifacts] Sending build.finish.properties.gz file
[17:16:21]: Build finished
4

1 回答 1

1

抱歉回复晚了。你可以有这样的过滤器,这就足够了:

+:BSF*
-:BSF.UnitTest
-:BSF.IntegrationTests

奇怪的退出代码可能意味着控制台运行程序进程由于不明原因而崩溃。您可以尝试最新的控制台运行程序构建 (http://confluence.jetbrains.net/display/DCVR/dotCover+2.2+Nightly+Builds) 或更新 TC 内置的 dotCover。为此,将 TC 服务器上的 zip 压缩到以下路径:TeamCity \ webapps \ ROOT \ WEB-INF \ plugins \ dotNetRunners \ agent \ dotCover.zip (完整路径可能会有所不同)这将自动将其部署到所有代理。如果这对您不起作用,请随时联系支持人员。

于 2012-10-24T14:47:13.150 回答