私はOpenCover(今日ダウンロード)を使用してテストの範囲を取得しようとしていました。これが私が使用したコマンドラインです:
OpenCover.Console.exe -target:"c:\Programmes2\xunit\xunit.console.clr4.x86.exe" -targetargs:"""C:\Sources\Project\BackOffice.Tests\bin\Debug\BackOffice.Tests.dll"" /noshadow " -output:bo.coverage.xml -targetdir:"C:\Sources\Project\BackOffice.Tests\bin\Debug" -filter:+[*]*
そして、これが私が得た出力です
xUnit.net console test runner (32-bit .NET 4.0.30319.269)
Copyright (C) 2007-11 Microsoft Corporation.
xunit.dll: Version 1.9.0.1566
Test assembly: C:\Sources\Project\BackOffice.Tests\bin\Debug\BackOffice.Tests.dll
31 total, 0 failed, 0 skipped, took 2.760 seconds
Committing...
No results - no assemblies that matched the supplied filter were instrumented
this could be due to missing PDBs for the assemblies that match the filter
please review the output file and refer to the Usage guide (Usage.rtf)
生成されるレポートは常に同じです。
<?xml version="1.0" encoding="utf-8"?>
<CoverageSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Modules />
</CoverageSession>
もう少しコンテキスト:PDBはターゲットフォルダーに存在します。管理者としてコマンドプロンプトを実行しています。テストされたプロジェクトは、.net 4 /mvc3アプリケーションです。私のコンピューターはWindows7/32ビットを実行しています。そのトピックについては、それが何らかの形で関連しているかどうかはわかりませんが、ターゲットのプレートフォームを強制的にx86にしたとしても、のx86フォルダーは空です。
また、OpenCover.Profiler.dllをzippy32に登録しようとすると、dllが私のWindowsバージョンと互換性がない可能性があるというエラーが表示されます。
-registerまたは-register:userパラメーターを使用しようとすると、例外が発生します。
An exception occured: Failed to register(user:True,register:True,is64:False):3 the profiler assembly; you may want to look into permissions or using the -register:user option instead. C:\Windows\system32\regsvr32.exe /s /n /i:user "C:\Sources\Opencover\sawilde-opencover-be6e491\main\bin\Debug\x86\OpenCover.Profiler.dll"
stack:
à OpenCover.Framework.ProfilerRegistration.ExecuteRegsvr32(Boolean userRegistration, Boolean register, Boolean is64) dans C:\Sources\Opencover\sawilde-opencover-be6e491\main\OpenCover.Framework\ProfilerRegistration.cs:ligne 59
à OpenCover.Framework.ProfilerRegistration.ExecuteRegsvr32(Boolean userRegistration, Boolean register) dans C:\Sources\Opencover\sawilde-opencover-be6e491\main\OpenCover.Framework\ProfilerRegistration.cs:ligne 45
à OpenCover.Framework.ProfilerRegistration.Register(Boolean userRegistration) dans C:\Sources\Opencover\sawilde-opencover-be6e491\main\OpenCover.Framework\ProfilerRegistration.cs:ligne 31
à OpenCover.Console.Program.Main(String[] args) dans C:\Sources\Opencover\sawilde-opencover-be6e491\main\OpenCover.Console\Program.cs:ligne 82
また、別のプロジェクト(xunitも)でテストされたDLLプロジェクト(.net4)を試してみましたが、同じ(不足している)結果が得られました。
助けていただければ幸いです!