[英]Running tests using NUnit3 Console
I'm trying to run tests via the command line using the NUnit Console Runner: https://github.com/nunit/docs/wiki/Console-Runner 我正在尝试使用NUnit Console Runner通过命令行运行测试: https : //github.com/nunit/docs/wiki/Console-Runner
I have installed https://www.nuget.org/packages/NUnit.ConsoleRunner/ NUnit.ConsoleRunner
in my NuGet 我已经在我的NuGet中安装了https://www.nuget.org/packages/NUnit.ConsoleRunner/ NUnit.ConsoleRunner
I have opened up the command line location in \\sanitized\\bin\\Debug\\netcoreapp2.1
. 我已经在\\sanitized\\bin\\Debug\\netcoreapp2.1
打开了命令行位置。 I run my test using the command NUNIT3-CONSOLE myTests.dll
as mentioned in https://github.com/nunit/docs/wiki/Console-Command-Line 我使用https://github.com/nunit/docs/wiki/Console-Command-Line中提到的命令NUNIT3-CONSOLE myTests.dll
运行测试
But I get the error: 但是我得到了错误:
NUNIT3-CONSOLE: command not found NUNIT3-CONSOLE:找不到命令
What command should I use? 我应该使用什么命令?
Note: This is a .netcore application 注意:这是一个.netcore应用程序
NUnit Console is currently unavailable for .net core: NUnit控制台当前不适用于.net核心:
NUnit Console is compiled using the full .NET Framework and does not currently support .NET Core. NUnit控制台是使用完整的.NET Framework编译的,当前不支持.NET Core。 To run .NET Core tests from the command line, you need to use dotnet test. 要从命令行运行.NET Core测试,您需要使用dotnet test。 For info on how to do this, see https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard 有关如何执行此操作的信息,请参见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. 我们正在考虑创建一个基于.NET Core的控制台运行程序,但它仍处于计划阶段。
Source: https://github.com/nunit/nunit-console/issues/487 资料来源: https : //github.com/nunit/nunit-console/issues/487
Just use dotnet test
as described in nunit wiki. 只需按照nunit Wiki中所述使用dotnet test
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.