远程运行编码的UI测试 [英] Running Coded UI test remotely

查看:70
本文介绍了远程运行编码的UI测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在VM上远程运行编码的UI测试。我正在使用Mstest.exe执行测试用例。
现在,当我通过Windows Scheduler运行它时,它失败了,因为它需要活动桌面。

I have to run Coded UI test remotely on a VM. I am using Mstest.exe to execute the test cases. Now when i run it , through Windows scheduler , it fails because it need "Active Desktop ".

我读了一些我们需要使用测试代理的地方。但是我不想配置测试代理和测试控制器只是为了设置活动桌面,还有其他我可以做的事情吗?

I read it a few places that we need to use test agent. But i dont want to configure test agent and test controller just to set "Active desktop", Is their something else that i can do ?

推荐答案

设置测试控制程序和测试代理并不困难,这确实很容易,也是最好的方法。
您可以在这里找到安装指南:
http://msdn.microsoft。 com / en-us / library / dd293551.aspx

Well there is no hard in setting up a test controler and a test agent, it is really easy and its the best way to go. You can find the installation guidelines here: http://msdn.microsoft.com/en-us/library/dd293551.aspx

但是,即使使用控制器,仍然存在一些问题。

However, there are few issues that still exist even when you use a controller.

测试代理可以在服务或过程模式下运行。对于编码的ui测试,您需要在进程模式下运行它(因为它需要在同一Windows会话中)。但是,当您使用远程桌面登录VM并关闭它时,目标计算机的桌面将保持锁定状态,无法进行测试。除非您登录,否则没有活动的会话,并且测试控制程序甚至都没有开始。

The Test Agent can run in either Service or Process mode. For coded ui test you need to run it in a process mode (because it needs to be in the same windows session). But when you log into VM, with Remote Desktop, and close it, the Desktop of the target machine stays locked and tests cannot proceed. And unless you log in, there is no active session and test controler doesnt even get started.

我知道有两种保持活动桌面的方法:

There are 2 ways to keep an active desktop that i know of:


  1. (推荐)从sysinternals套件运行AutoLogOn.exe(可在 http://live.sysinternals.com/ )。在计算机启动时,它将自动以指定的用户身份登录,并使桌面保持活动状态。

  2. 将远程桌面保持在非最小化窗口中。您几乎找不到能够打开多个远程桌面并保持连接状态的应用程序。

  1. (recommended) Run AutoLogOn.exe from sysinternals suite (can be found at http://live.sysinternals.com/). It will automatically log in with specified user than the machine starts, and keep the desktop active.
  2. Keep a remote desktop in a non minimized window active. There are few applications that you can find that can keep multiple remote desktop's open, and keeping it connected should do the trick.

状态。

这篇关于远程运行编码的UI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆