我正嘗試在ASP.NET Core上運行Xunit和Fluent斷言的代碼覆蓋率。但是,我收到了一個我不太瞭解的錯誤消息。用OpenCover運行XUnit和FluentAssertions會給出錯誤信息
我的測試項目的project.json:
{
"version": "1.0.0-*",
"testRunner": "xunit",
"debugType": "portable",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"FluentAssertions": "4.15.0",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"ExpenseReporting": "1.0.0-*",
"Moq": "4.6.38-alpha"
},
"commands": {
"test": "xunit.runner.dnx"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
}
}
}
}
我對OpenCover命令:
OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test "C:\Users\johndoe\Desktop\Application\ExpenseReporting.Test\project.json"" -output:coverage.xml -register:user -filter:"+[*]* -[xunit*]* -[*]*Migrations.*"
我收到了很多錯誤,但都是這樣的:
An System.IO.DirectoryNotFoundException occured: Could not find a part of the path 'C:\projects\fluentassertions-vf06b\Src\FluentAssertions.NET40\Execution\MSTestFramwork.cs'.
我很清楚該目錄沒有找到,因爲它不存在。我想知道爲什麼它試圖在那裏訪問它?
你有沒有發現任何解決這個? – valorl