且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Visual Studio中使用OpenCover代码覆盖率运行NUnit测试?

更新时间:2023-02-21 09:45:20

我在Visual Studio中发现的代码覆盖率***解决方案如下:

  1. 打开Visual Studio 2017
  2. 转到工具"->扩展和更新"
  3. 转到在线",在搜索(窗口右上方)中键入 " AxoCover "
  4. 点击安装",然后按照说明进行操作(即,关闭Visual Studio,以 开始安装)
  5. 重新打开Visual Studio
  6. 构建项目
  7. 转到工具"->"AxoCover"
  8. 在测试"标签下,右键单击您的***目录,然后转到封面 测试"
  9. 点击报告"标签
  1. Open Visual Studio 2017
  2. Go to Tools->Extensions and Updates
  3. Go to "Online", in the search (top right of the window) type "AxoCover"
  4. Click install, follow the instructions (i.e. close Visual Studio to start the install)
  5. Reopen Visual Studio
  6. Build your project
  7. Go to Tools->AxoCover
  8. Under the "Tests" tab right click your top directory and go "Cover tests"
  9. Click on the "Report" tab