如果我用这个来运行我的测试:
OpenCover.Console.exe -target:"xunit.console.exe" -targetargs:"\"test1.dll\" \"test2\" -noshadow -noappdomain -xml \"xunit-test-results.xml\"" -filter:"-[XUnit]* -[Moq]*" -skipautoprops -register:path64 -output:"opencover-report.xml" -log:All
我获得了大量FileNotFoundExceptions
加载依赖项和MissingMethodException
正在运行的测试。
如果我从-noappdomain
的调用中移除xunit.console.exe
,我会收到OpenCover.Console.exe
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.
我做错了什么?
答案 0 :(得分:0)
覆盖范围部分是由于过滤器中缺少+[*]*
。
错误可能是xunit.console.exe
默认使用AppDomain
的原因。