How can I run NUnit tests in Visual Studio 2017?

前端 未结 9 637
后悔当初
后悔当初 2020-11-29 21:15

I\'ve just installed Visual Studio 2017. I have a project using NUnit for the test cases. Ctrl + R - T no longer runs the tests, and the Tes

相关标签:
9条回答
  • 2020-11-29 21:58

    To run or debug tests in Visual Studio 2017, we need to install "NUnit3TestAdapter". We can install it in any version of Visual Studio, but it is working properly in the Visual Studio "community" version.

    To install this, you can add it through the NuGet package.

    0 讨论(0)
  • 2020-11-29 22:01

    You need to install three NuGet packages:

    • NUnit
    • NUnit3TestAdapter
    • Microsoft.NET.Test.Sdk
    0 讨论(0)
  • 2020-11-29 22:04

    Install the NUnit and NunitTestAdapter package to your test projects from Manage Nunit packages. to perform the same: 1 Right-click on menu Project → click "Manage NuGet Packages". 2 Go to the "Browse" tab -> Search for the Nunit (or any other package which you want to install) 3 Click on the Package -> A side screen will open "Select the project and click on the install.

    Perform your tasks (Add code) If your project is a Console application then a play/run button is displayed on the top click on that any your application will run and If your application is a class library Go to the Test Explorer and click on "Run All" option.

    0 讨论(0)
提交回复
热议问题