nunit - 执行 NUnit 测试时出现 Powershell 错误

标签 nunit powershell-2.0 nunit-console

这可能听起来很傻,但我一直在尝试使用 powershell 脚本执行 NUnit 测试,尝试了几次但没有希望。有不同的格式还是我需要添加插件?

任何帮助都会被应用...

Command = "c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" /config=Release "C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

Output as below:

PS C:\tests> "c:\Program Files\NUnit2.4.8\bin\nunit-console.exe" /config=Release

"C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

You must provide a value expression on the right-hand side of the '/' operator.

At line:1 char:55 + "c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" / <<<<

config=Release "C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1



提前致谢

最佳答案

你没有放零件

/config=Release

在您引用的命令文本中。

你的命令应该看起来像
"c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe /config=Release C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

...我没有检查 nunit-console.exe 命令行选项,但我想您已经测试过 nunit 命令是否有效。

关于nunit - 执行 NUnit 测试时出现 Powershell 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2111069/

相关文章:

c# - Selenium 2.0 WebDriver 高级交互 DoubleClick 帮助 (c#)

unit-testing - 为什么 nUnit 测试经常在 Visual Studio 2015 中消失?

powershell - 编辑 Windows 任务计划程序任务的触发器

NUnit失败,出现System.ArgumentException : The net-4. 0框架不可用

jenkins - 使用两个不同的作业构建和运行单元测试

testing - 在单元测试中使用依赖注入(inject)对象是个坏主意吗?

c# - 当您想要测试派生类与基类的交互时如何构建单元测试

powershell-2.0 - Powershell : Count items in a folder with PowerShell

powershell - 通过命令行启用Powershell组策略异常

c# - 在 NUnit.ConsoleRunner.3.2.1 中运行测试时,NUnit 运行器失败