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

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

问题描述

我想在 ASP.NET Core 应用程序中测量我的 XUnit 测试的代码覆盖率.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/ 显示了使用 open cover 命令行的解决方法.我正在寻找一种在 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天全站免登陆