我正在使用 OpenCover http://nuget.org/packages/opencover并编写了以下批处理文件来运行单元测试并生成代码覆盖率统计信息:
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\Debug\”
感谢任何帮助,
谢谢,