我尝试使用以下命令在命令提示符下运行 flaUiTests:
pathToConsole\nunit3-console.exe pathToApp\App.dll --testparam:App=pathToExecutable\App.exe
在测试代码中,我将 testparam 与以下代码一起使用:
string lParameterPathExecutable = TestContext.Parameters["App"];
我测试了命令提示符是否可以找到所有文件并且他可以。无论如何,我仍然得到错误:System.ComponentModel.Win32Excetion:系统找不到指定的文件。
有谁知道问题是什么?这个命令有什么问题?测试代码在VisualStudio2019,NUnit3-console的版本是3.12.0。
编辑:可以找到 nunit3-console。我认为 nunit3-console 运行。这是测试结果:
System.ComponentModel.Win32Exception : The system cannot find the file specified
--Win32Exception
The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at NUnit.Engine.Services.TestAgency.CreateRemoteAgent(TestPackage package, Int32 waitTime)
at NUnit.Engine.Runners.ProcessRunner.CreateAgentAndRunner()
at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)
Test Run Summary
Overall result: Failed
Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
Start time: 2021-02-10 21:26:08Z
End time: 2021-02-10 21:26:08Z
Duration: 0.145 seconds
Results (nunit3) saved as TestResult.xml