2017-05-26 24 views
2

結果、私は、コードカバレッジ結果を試してみて、生成するには、次のバッチファイルを使用しています:C#ASP.NETコードカバレッジ - OpenCoverいいえ

@echo off 

SET dotnet="C:/Program Files/dotnet/dotnet.exe" 
SET opencover=.\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe 
SET reportgenerator=.\packages\ReportGenerator.2.5.8\tools\ReportGenerator.exe 

SET targetargs="test .\test\IdentityServer.UnitTests\IdentityServer.UnitTests.csproj -f net461" 
SET filter="+[*]QuickstartIdentityServer* -[*.Tests]* -[xunit.*]* -[FluentValidation]*" 
SET coveragefile=Coverage.xml 
SET coveragedir=Coverage 

REM Run code coverage analysis 
%opencover% -oldStyle -register:user -target:%dotnet% -output:%coveragefile% -targetargs:%targetargs% -filter:%filter% -skipautoprops -hideskipped:All 

REM Generate the report 
%reportgenerator% -targetdir:%coveragedir% -reporttypes:Html;Badges -reports:%coveragefile% -verbosity:Error 

REM Open the report 
start "report" "%coveragedir%\index.htm" 

テストを正常に動作するように見えるが、私は、次のエラーメッセージが表示されます。

Starting test execution, please wait... 

Total tests: 12. Passed: 12. Failed: 0. Skipped: 0. 

Test Run Successful. 
Test execution time: 4.0469 Seconds 


Committing... 
No results, this could be for a number of reasons. The most common reasons are: 
    1) missing PDBs for the assemblies that match the filter please review the 
    output file and refer to the Usage guide (Usage.rtf) about filters. 
    2) the profiler may not be registered correctly, please refer to the Usage 
    guide and the -register switch. 

プロジェクトのいくつかのより多くの背景:

ソリューション構造:

test project:SolutionDir\test\IdentityServer.UnitTests\IdentityServer.UnitTests.csproj 

project being tested: 
    path: SolutionDir\src\QuickstartIdentityServer\QuickstartIdentityServer.csproj 
    target framework: net461 

すべてのヘルプは歓迎です!

+0

あなたはPDBファイルのどのような種類を生成していますか? –

答えて

関連する問題