vstest.console。无法远程执行 [英] vstest.console. can't be executed remotely
问题描述
你好团队,
我正在写一个PS脚本来远程执行测试。首先将测试程序集复制到远程计算机,然后使用
Invoke-Command -ComputerName $ remoteComputerName ... 来执行vstest.console。但是,带有/ Platform:x64 InIsolation的vstest.console失败并显示以下错误消息。
vstest.console:错误:无法初始化客户端代理:无法连接到vstest.discoveryengine.exe。
  + CategoryInfo       :NotSpecified :(错误:失败了... veryengine.exe.:String)[],RemoteException
  + FullyQualifiedErrorId:NativeCommandError
错误:没有端点监听net.pipe:// remoteComputerName /vstest.discoveryengine/9524接受
消息。这通常是由错误的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。
似乎在隔离模式下,还有一个名为 vstest.discoveryengine
的附加进程做工作。也许这个过程有问题。
有趣的是,当我在没有x64平台设置的情况下运行vstest.console时,一切都很好。而且我还发现只有一个进程名称'vstest.console.exe'正在运行。
那么我该怎样做才能使x64-platform vstest.console远程运行?
环境信息:
我在Windows Server 2012 R2上安装了Microsoft Visual Studio Agents 2012 / Test Controller 2012
谢谢,
-Jingfei
继续参与!
嗨景飞,
您想要通过PS脚本中的vstest.console.exe远程运行哪种类型的测试?
据我所知,它是默认的,那里有有两种方法可以远程运行自动化测试。
一种方法是我们可以通过配置测试控制器和测试代理远程运行自动化测试,并将它们设置在VS IDE的测试设置文件中。
参考:
https://msdn.microsoft.com /en-us/library/hh546459.aspx
https://msdn.microsoft.com/en-us/library/ff469838.aspx
另一种方式是我们可以通过命令行远程运行自动化测试vstest.console.exe。
但我建议您最好在VS IDE中成功远程运行自动化测试,然后再在命令行中使用vstest.console.exe运行它。 / p>
因此,请尝试从VS IDE远程运行测试,然后检查它。
如果可以从VS IDE远程成功运行测试,我建议您可以尝试在命令行中使用vstest.console.exe在没有PS脚本的情况下执行测试。
执行命令如: vstest.console.exe myTestFile.dll /Settings:Local.RunSettings
欲了解更多信息:
https://msdn.microsoft.com/en-us/library/jj155796 .aspx?f = 255& MSPPError = -2147217396
确保使用vstest.console.exe成功远程运行测试后命令行,然后尝试编写你的PS脚本再次运行测试检查它。
最好的问候,
Hi team,
I am writing a PS script to execute tests remotely. First the test assemblies are copied to the remote machine, and then use the Invoke-Command -ComputerName $remoteComputerName ... to execute vstest.console. However, vstest.console with /Platform:x64 InIsolation fails with below error message.
vstest.console : Error: Failed to initialize client proxy: could not connect to vstest.discoveryengine.exe.
+ CategoryInfo : NotSpecified: (Error: Failed t...veryengine.exe.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Error: There was no endpoint listening at net.pipe://remoteComputerName/vstest.discoveryengine/9524 that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
It seems that in isolation mode, there is an additional process named vstest.discoveryengine to do work. Maybe there is something wrong with this process.
Interestingly, when I run vstest.console WITHOUT the x64 platform set, everything is fine. And i also find there is only one process name 'vstest.console.exe' running.
So what am i gonna do to make x64-platform vstest.console running remotely?
Env information:
I've installed the Microsoft Visual Studio Agents 2012/Test Controller 2012 on my Windows Server 2012 R2
Thanks,
-Jingfei
Keep involved!
Hi Jingfei,
What type test you want to run remotely by the vstest.console.exe in the PS script?
As far as I know that it is default that there are 2 ways run automated tests remotely.
One way is that we could run automated test remotely by configuring the test controller and test agent and set their in the test setting file from the VS IDE.
Reference:
https://msdn.microsoft.com/en-us/library/hh546459.aspx
https://msdn.microsoft.com/en-us/library/ff469838.aspx
Another way is that we could run automated test remotely by command line like the vstest.console.exe.
But I suggest you'd better ensure the automated test run remotely successfully from the VS IDE before you run it using vstest.console.exe in command line.
So please try to run your tests remotely from the VS IDE and then check it.
If you could run the test successfully remotely from the VS IDE, I suggest you could try to execute the test using vstest.console.exe in command line without the PS script.
The executing command like:vstest.console.exe myTestFile.dll /Settings:Local.RunSettings
For more information:
https://msdn.microsoft.com/en-us/library/jj155796.aspx?f=255&MSPPError=-2147217396
After you ensure you could run the test remotely successfully using vstest.console.exe in command line and then try to write your PS script to run test again check it.
Best Regards,
这篇关于vstest.console。无法远程执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!