0
我無法讓以下方面一起工作。NCover 1.5.8與痣/ Pex和NUnit
- NCover 1.5.8(隨TestDriven.NET版本)
- NUnit的2.5(隨TestDriven.NET版本)
- 痣和Pex公司
我使用Windows 7 x64與.NET 4.0 Pex和莫爾斯測試庫
我試圖從this類似的問題(關於讓痣與MSTest合作)和相關鏈接的提示。我確實設法讓Moles和NUnit一起工作,這要感謝this answer,但我無法讓它與NCover一起工作。
這裏是一個批處理文件。
:: Some paths
:: ==========
set NCoverPath=C:\Program Files (x86)\TestDriven.NET 3\NCover\1.5.8
set NUnitPath=C:\Program Files (x86)\TestDriven.NET 3\NUnit\2.5
set MolesPath=C:\Program Files\Microsoft Moles\bin
:: Some environment variables
:: ==========================
:: (I've tried every combination I can think of here...)
set ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler
set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler
set COR_PROFILER={3FB1CC1E-1C17-4A37-9C18-BF3DB8F10E46}
set CLRMONITOR_EXTERNAL_PROFILERS={3FB1CC1E-1C17-4A37-9C18-BF3DB8F10E46}
:: (Note 3FB1CC1E-1C17-4A37-9C18-BF3DB8F10E46 is the CLSID of NCoverLib.dll 1.5.8.
:: Use {9721F7EB-5F92-447c-9F75-79278052B7BA} instead for NCover 3.x or later)
:: Call NCover
:: ===========
:: Here is the main call to NCover/Moles.Runner/NUnit-Console
"%NCoverPath%\ncover.console.exe"^
//pm moles.runner.exe^
//ea "moles.runner;mscorlib.Moles"^
//reg^
"%MolesPath%\moles.runner.exe" "Pex.Tests.dll"^
/runner:"%NUnitPath%\NUnit-console.exe"
這是輸出我得到:
NCover.Console v1.5.8 - Code Coverage Analysis for .NET - http://ncover.org
Copyright (c) 2004-2006 Peter Waldschmidt
Command: C:\Program Files\Microsoft Moles\bin\moles.runner.exe
Command Args: ".\Pex.Tests.dll" "/runner:C:\Program Files (x86)\TestDriven.NET 3\NUnit\2.5\NUnit-console.exe"
Working Directory:
Assemblies:
Coverage Xml: Coverage.Xml
Coverage Log: Coverage.Log
Waiting for profiled application to connect...Microsoft Moles Runner v0.94.51023.0 -- http://research.microsoft.com/moles -- .NET v4.0.30319
Copyright (c) Microsoft Corporation 2007-2010. All rights reserved.
instrumenting...started
NUnit version 2.5.5.10112
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR Version: 4.0.30319.239 (Net 4.0)
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-4.0
.................................
Tests run: 33, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Connected
Profiled process terminated. Profiler connection not established.
它返回錯誤代碼1和我的覆蓋文件包含所有測試的名稱,但與零覆蓋。