C# Code Coverage with Selenium

前端 未结 2 1147
栀梦
栀梦 2021-02-09 18:27

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

2条回答
  •  你的背包
    2021-02-09 18:53

    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.

    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.

    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.

提交回复
热议问题