硒的C#代码覆盖率 [英] C# Code Coverage with Selenium

查看:55
本文介绍了硒的C#代码覆盖率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为通过Selenium测试的C#/.NET项目创建代码覆盖率报告的方法吗?

Does anyone know of a way to create Code Coverage reports for C#/.NET projects tested via Selenium?

推荐答案

我能够找到以下文章,来自NCover的同事,

I was able to find the following article "Code Coverage of ASP.NET Applications on IIS" from the folks at NCover, not free, which supports IIS instrumentation and code coverage. This would enable you to run Selenium and gather coverage results.

ASP.NET应用程序很难测试可能是本世纪的轻描淡写.在本文中,我们将向您展示如何使用Selenium测试ASP.NET应用程序,以及如何使用NCover查看测试范围.

That ASP.NET applications are fairly difficult to test may be the understatement of the century. In this article, we’re going to show you how to test ASP.NET applications with Selenium, and how to use NCover to review your test coverage.

虽然使用Selenium可以使您的ASP.NET应用程序获得100%的覆盖率,但我们强烈建议您以分层方式开发应用程序,并使用单元测试框架(例如NUnit,MSTest)尽可能多地测试这些层或MbUnit.

While it is possible to get 100% coverage for your ASP.NET application using Selenium, we highly recommend that you develop your application in layers and test as many of those layers as possible with a unit testing framework such as NUnit, MSTest, or MbUnit.

这篇关于硒的C#代码覆盖率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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