如何在Visual Studio的ASP.NET Core项目中衡量代码覆盖率?

编程入门 行业动态 更新时间:2024-10-12 05:53:37
本文介绍了如何在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.

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

The blog post dotnetthoughts/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还为我的核心测试项目返回代码覆盖率信息。

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 core test projects.

更多推荐

如何在Visual Studio的ASP.NET Core项目中衡量代码覆盖率?

本文发布于:2023-11-14 22:09:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588625.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:覆盖率   代码   项目   如何在   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!