运行 使用 NUnit3 控制台进行测试

Running tests using NUnit3 Console

我正在尝试 运行 使用 NUnit Console Runner 通过命令行进行测试: https://github.com/nunit/docs/wiki/Console-Runner

我已经在我的 NuGet

中安装了 https://www.nuget.org/packages/NUnit.ConsoleRunner/ NUnit.ConsoleRunner

我已经在\sanitized\bin\Debug\netcoreapp2.1中打开了命令行位置。我 运行 我的测试使用 NUNIT3-CONSOLE myTests.dll 命令,如 https://github.com/nunit/docs/wiki/Console-Command-Line

中所述

但我收到错误:

NUNIT3-CONSOLE: command not found

我应该使用什么命令?

Note: This is a .netcore application

NUnit 控制台当前不可用于 .net 核心:

NUnit Console is compiled using the full .NET Framework and does not currently support .NET Core. To run .NET Core tests from the command line, you need to use dotnet test. For info on how to do this, see https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard

We are looking at creating a .NET Core based console runner, but it is still in the planning stages.

来源:https://github.com/nunit/nunit-console/issues/487

只需按照 nunit wiki 中的说明使用 dotnet test