5

opencover を使用してクラスからカバレッジを取得するのに問題があります。

メイン クラスを含む Viewer.dll と、ビューアのテストを含む Viewer_Test.dll があります。

コマンドを実行すると、すべてのテストが期待どおりに実行されます。

OpenCover.Console.exe -register:user -target:"$(nunitpath)/nunit-console-x86.exe" -targetargs:"/noshadow Viewer_Tests.dll /domain:single" -filter:+[*]* -output:coverage.xml

ReportGenerator.exe coverage.xml "coveragereport" html

生成されたレポートを見ると、メイン クラスではなく、テスト クラスのみがリストされています。

opencover コマンドのコンソール出力を次に示します。

Committing...
Visited Classes 5 of 5 (100)
Visited Methods 41 of 41 (100)
Visited Points 482 of 557 (86.5350089766607)
Visited Branches 6 of 12 (50)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 5 of 5 (100)
Alternative Visited Methods 44 of 44 (100)

Viewer.dll もカバーするように opencover を作成するにはどうすればよいですか?

4

0 に答える 0