且构网

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

如何在Visual Studio 2017中运行NUnit测试?

更新时间:2022-12-22 10:17:36

将NUnit测试适配器NuGet包添加到测试项目中

Add the NUnit test adapter NuGet package to your test projects

  • 2.* (https://www.nuget.org/packages/NUnitTestAdapter/)
  • 3.* (https://www.nuget.org/packages/NUnit3TestAdapter/)

或安装测试适配器" Visual Studio扩展.

Or install the Test Adapter visual studio extension. There is one for

  • 2.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnitTestAdapter)
  • 3.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter).

我更喜欢NuGet软件包,因为它会与您的项目使用的NUnit版本同步,因此会自动匹配任何构建服务器中使用的版本.

I prefer the NuGet package because it will be in sync with the NUnit version used by your project and will thus automatically match the version used in any build server.