Windows 有没有像 xvfb 或 xnest 这样的东西? [英] Is there anything like xvfb or xnest for Windows?

查看:52
本文介绍了Windows 有没有像 xvfb 或 xnest 这样的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在具有驱动 GUI 的端到端测试的项目中,在开发人员工作站上运行测试很尴尬,因为 GUI 自动化驱动程序会干扰桌面.它会移动鼠标,从我们想要使用的应用中转移注意力,如果我们在测试运行期间切换到另一个应用,它可能会开始在错误的应用中输入文本.

On projects with end-to-end tests that drive the GUI, it is awkward to run the tests on a developer workstation because the GUI automation driver interferes with the desktop. It moves the mouse, steals focus away from apps we want to use, and can start typing text into the wrong application if we switch to another app during a test run.

在 Linux 上,我们通过在虚拟 X 服务器(xvfb 或 xnest)上运行测试中的应用程序解决了这个问题.使用 xnest,我们可以观看测试运行,但仍然可以使用真实桌面而不受干扰.

On Linux we've solved this by running the application under test on a virtual X server (xvfb or xnest). With xnest we can watch the tests running but still use the real desktop without interference.

是否有与 Windows 相同的东西?

Is there anything equivalent for Windows?

推荐答案

我发现了一个由 Frank P. Westlake 编写的名为RunProcess.exe"的免费软件程序,它可以运行绑定到非交互式(例如屏幕外)WindowStation.但是,没有来源.

I found a freeware program called "RunProcess.exe" written by Frank P. Westlake that can run a process bound to the desktop of a non-interactive (e.g. off-screen) WindowStation. However, there is no source.

因此,我使用 Java 和 JNA 实现了我自己的版本(比 Frank Westlake 的更简单).它位于工具模块的 Window Licker 存储库中.该类称为 com.objogate.wl.win32.RunOnDesktop.在某些时候,我可能会将它移植到 C 并使其成为普通的命令行 .exe,或者可能将其转换为 Ant 任务以在屏幕外运行测试.

Therefore I've implemented my own version (simpler than Frank Westlake's) with Java and JNA. It's in the Window Licker repository in the tools module. The class is called com.objogate.wl.win32.RunOnDesktop. At some point I may port it to C and make it a normal command-line .exe, or maybe turn it into an Ant task for running tests off-screen.

这篇关于Windows 有没有像 xvfb 或 xnest 这样的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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