Getting code coverage in .net core, xUnit project

2019-02-27 05:31发布

I'm trying to get code coverage in .net core project using directions from https://github.com/Microsoft/vstest-docs/blob/master/docs/analyze.md#working-with-code-coverage

Test are working correctly Tests without code coverage

However, when I add code coverage option I get this error:

Starting test execution, please wait...
Unable to read data from the transport connection: An existing connection was 
forcibly closed by the remote host.
Object reference not set to an instance of an object.

Tests with code coverage

Maybe someone have experienced it and could share knowledge how to fix it?

1条回答
We Are One
2楼-- · 2019-02-27 06:04

When I tried to run powershell as an administrator this problem disappeared, so I guess it has something to do with access permissions.

查看更多
登录 后发表回答