我使用OpenCover http://nuget.org/packages/opencover並寫了下面的批處理文件來運行單元測試和生成代碼覆蓋率統計PDB文件:當我運行該批處理文件OpenCover/NUnit的找不到
echo off
echo ***************************
echo *** Running NUnit tests ***
echo ***************************
"..\packages\OpenCover.4.0.804\OpenCover.Console.exe" -register:user -target:"..\NUnit 2.6\bin\nunit-console-x86.exe" -targetargs:"..\Web.UnitTests\bin\Debug\Web.UnitTests.dll" -output:coverage.xml
echo **************************************
echo *** Generating coverage statistics ***
echo **************************************
"..\packages\ReportGenerator.1.6.0.0\ReportGenerator.exe" "-reports:coverage.xml" "-targetdir:%CD%"
echo ***********************************
echo *** Launching Internet Explorer ***
echo ***********************************
start "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "%CD%\Index.htm"
pause
然而我得到的錯誤:
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)
很確定我做了一件愚蠢的事情/缺少一些明顯的東西,但不知道是什麼!
的PDB文件夾中: 「.. \ Web.UnitTests \ BIN \調試\」
得到任何幫助,
感謝,
謝謝,這有幫助。 – JoshGough
這也幫助了我,謝謝! – willem