如何在Visual Studio的ASP.NET Core项目中衡量代码覆盖率? [英] How to measure Code Coverage in ASP.NET Core projects in Visual Studio?

查看:77
本文介绍了如何在Visual Studio的ASP.NET Core项目中衡量代码覆盖率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测量ASP.NET Core应用程序中XUnit-Tests的代码覆盖率。 Visual Studio 2015中的.NET Core工具是预览版2,到目前为止,代码覆盖范围无效。

I want to measure the Code Coverage of my XUnit-Tests in an ASP.NET Core application. The Tooling for .NET Core in Visual Studio 2015 is preview 2 and code coverage does not work so far.

博客文章 http://dotnetthoughts.net/measuring-code-coverage-of-aspnet-core-applications-using-opencover/ 显示了一种使用开放式命令行的解决方法。我正在Visual Studio中寻找一种更集成的方法。

The blog post http://dotnetthoughts.net/measuring-code-coverage-of-aspnet-core-applications-using-opencover/ from February shows a workaround by using the command line of open cover. I am looking for a more integrated way inside of Visual Studio.

有人听说过与XUnit结合使用更好/更集成的代码覆盖率测量方法吗?

Has anybody heard of a better / more integrated way of measuring Code Coverage in combination with XUnit ?

推荐答案

我刚刚尝试过ReSharper版本2016.3 EAP 4(早期访问预览)。除了执行单元测试外,现在dotCover还为我的.net核心测试项目返回代码覆盖率信息。

I have just tried the ReSharper version 2016.3 EAP 4 (Early access preview). Besides unit test execution now dotCover returns code coverage information for my .net core test projects.

这篇关于如何在Visual Studio的ASP.NET Core项目中衡量代码覆盖率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆