我们可以通过保持会话最小化来在远程计算机上执行 QTP 脚本吗

发布于 2024-09-09 07:43:20 字数 122 浏览 2 评论 0原文

我有几台机器,我希望在上面安排执行。我需要远程访问这些机器才能执行。每当我从这些机器开始执行并最小化会话时,我的脚本就会失败。所以只是想知道 QTP 脚本是否可以在保持会话最小化的同时执行。如果是,需要在脚本中进行哪些更改。谢谢。

I have couple of machines on which I wish to schedule exceutions. I need to access these machines remotely for exceution. Whenever I start exceution from these machines and minimize the session my script fails. So just curious to know whether QTP scripts can be executed while keeping sessions minimized. If yes what changes needs to be made in script. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

原来分手还会想你 2024-09-16 07:43:20

当您最小化此窗口时,操作系统会将远程会话切换到无 GUI 模式,并且不显示窗口和控件。因此,测试无法与被测试应用程序的 GUI 交互,因为在这种情况下 GUI 实际上并不存在。

您需要更改计算机(即连接到远程 QTP 工作站的计算机)上的注册表项。以下是分步说明:

  1. 关闭在计算机上打开的远程桌面会话。
  2. 单击开始并选择运行。在“运行”对话框中,键入 regedit,然后按 Enter。注册表编辑器启动
  3. 找到以下任意注册表项:
    HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\
    (如果您想更改您的用户帐户的 RDC 设置)
    -- 或 --
    HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
    (如果您想要更改所有帐户的 RDC 设置)
  4. 在此项中创建一个名为 RemoteDesktop_SuppressWhenMinimized 的新 DWORD 值。指定 2 作为值数据。

就这样。现在,最小化计算机上的远程桌面连接窗口不会影响远程计算机的 GUI,并且 GUI 仍可用于自动化 GUI 测试。

这取自: http://blog.smartbear.com/post/10-10-11/testcomplete-tip-running-tests-in-minimized-remote-desktop-windows/

When you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, the tests are unable to interact with the tested application’s GUI as the GUI doesn’t actually exist in this case.

You need to change Registry keys on your computer (that is, the computer from which you connect to a remote QTP workstation). Here is a step-by-step description:

  1. Close Remote Desktop sessions opened on your computer.
  2. Click Start and select Run. In the Run dialog box, type regedit and press Enter. Registry Editor starts
  3. Locate any of the following Registry keys:
    HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\
    (if you want to change the RDC settings for your user account)
    -- or --
    HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
    (if you want to change the RDC settings for all accounts)
  4. Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.

That’s all. Now minimizing the Remote Desktop Connection window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tests.

This was taken from: http://blog.smartbear.com/post/10-10-11/testcomplete-tip-running-tests-in-minimized-remote-desktop-windows/

甜心小果奶 2024-09-16 07:43:20

您面临的问题是,如果您最小化显示器,则删除机器知道它没有显示器,并忽略有关控制位置和移动鼠标请求的任何问题。在某些情况下,QTP 使用设备重放运行测试,这意味着测试将失败。

要解决此问题,您需要让远程计算机认为它仍然有人连接到它。一种方法(显然)是不最小化或关闭远程桌面会话。另一种方法是使用远程访问程序,该程序在最小化时不会通知远程计算机,此类程序的免费示例是 VNC,如果我没记错的话,您甚至可以关闭 VNC 会话(不仅仅是最小化它),测试仍然会成功运行。

The problem you're facing is that if you minimize your display the remove machine knows that it doesn't have a display and ignores any questions about control locations and requests to move the mouse. In some cases QTP runs tests using device replay which means that the test will fail.

To work around this you need to have the remote machine think that it still has someone attached to it. One way is (obviously) to not minimize or close the remote desktop session. Another way is to use a remote access program that doesn't inform the remote machine when it's minimized a free example of such program is VNC, if I remember correctly you can even close the VNC session (not just minimize it) and the test will still run successfully.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文