尝试使用 Gallio.echo 测试运行程序远程运行 GUI C# 测试时出现问题

发布于 2024-09-09 08:31:03 字数 1955 浏览 5 评论 0原文

我有一组启动并测试 GUI 的 C# 测试。 我使用 Gallio.echo CLI 来运行这些测试。 运行在Windows Server 2003上 Hudson master 运行在 Ubuntu 上 2003 的盒子是一个 hudson 从机,

我可以在我的 2003 机器上使用 gallio.echo 本地运行我的测试。但是,我有一个 Hudson 作业尝试运行这些测试,但失败了,可能是因为无法启动被测试的 GUI。 Hudson 的错误输出如下:

gallio.echo /rt:Xml 'Install Default Path/bin/Debug/Install Default Path.dll'

Gallio Echo - Version 3.1 build 397
Get the latest version at http://www.gallio.org/

Start time: 11:36 AM
Initializing the runtime and loading plugins.
Verifying test files.
Initializing the test runner.
Running the tests.
[failed] Test Install Default Path/AP158aSuccessfulInstallDefaultPath/PerformInstall
Set Up
White.Core.UIItems.UIActionException: Couldn't find window with title Autopoll in process 2884, after waiting for 5000 ms

   at White.Core.Factory.WindowFactory.<>c__DisplayClass3.<WaitTillFound>b__1() in c:\white\Core\Factory\WindowFactory.cs:line 37
   at Bricks.Core.Clock.Perform(Do do, Matched matched, Expired expired) in C:\bricks\Bricks\Core\Clock.cs:line 44
   at White.Core.Factory.WindowFactory.WaitTillFound(Do find, String message) in c:\white\Core\Factory\WindowFactory.cs:line 38
   at White.Core.Factory.WindowFactory.FindWindowElement(Process process, String title) in c:\white\Core\Factory\WindowFactory.cs:line 44
   at White.Core.Factory.WindowFactory.CreateWindow(String title, Process process, InitializeOption option, WindowSession windowSession) in c:\white\Core\Factory\WindowFactory.cs:line 97
   at White.Core.Application.GetWindow(String title, InitializeOption option) in c:\white\Core\Application.cs:line 125
   at IRD.Autopoll.InstallerTestSuite.InstallDefaultPath.AP158aSuccessfulInstallDefaultPath.SetUp() in C:\cygwin\home\Administrator\workspace\Autopoll\Autopoll\test\AutopollSetup_Test\Install Default Path\AP158aSuccessfulInstallDefaultPath.cs:line 89

似乎测试已启动,但 GUI 由于远程显示问题而未启动,或者被隐藏且测试无法看到。

有人在远程 Windows 机器上运行 GUI 测试吗?

I have a set of C# tests that start up and test a GUI.
I user the Gallio.echo CLI to run these tests.
Running on Windows server 2003
Hudson master is running on Ubuntu
the 2003 box is a hudson slave

I can run my tests with gallio.echo locally on my 2003 machine. However, I have a Hudson job that tries to run these tests and it fails, probably because the GUI under test cannot be launched. Error output from Hudson is below:

gallio.echo /rt:Xml 'Install Default Path/bin/Debug/Install Default Path.dll'

Gallio Echo - Version 3.1 build 397
Get the latest version at http://www.gallio.org/

Start time: 11:36 AM
Initializing the runtime and loading plugins.
Verifying test files.
Initializing the test runner.
Running the tests.
[failed] Test Install Default Path/AP158aSuccessfulInstallDefaultPath/PerformInstall
Set Up
White.Core.UIItems.UIActionException: Couldn't find window with title Autopoll in process 2884, after waiting for 5000 ms

   at White.Core.Factory.WindowFactory.<>c__DisplayClass3.<WaitTillFound>b__1() in c:\white\Core\Factory\WindowFactory.cs:line 37
   at Bricks.Core.Clock.Perform(Do do, Matched matched, Expired expired) in C:\bricks\Bricks\Core\Clock.cs:line 44
   at White.Core.Factory.WindowFactory.WaitTillFound(Do find, String message) in c:\white\Core\Factory\WindowFactory.cs:line 38
   at White.Core.Factory.WindowFactory.FindWindowElement(Process process, String title) in c:\white\Core\Factory\WindowFactory.cs:line 44
   at White.Core.Factory.WindowFactory.CreateWindow(String title, Process process, InitializeOption option, WindowSession windowSession) in c:\white\Core\Factory\WindowFactory.cs:line 97
   at White.Core.Application.GetWindow(String title, InitializeOption option) in c:\white\Core\Application.cs:line 125
   at IRD.Autopoll.InstallerTestSuite.InstallDefaultPath.AP158aSuccessfulInstallDefaultPath.SetUp() in C:\cygwin\home\Administrator\workspace\Autopoll\Autopoll\test\AutopollSetup_Test\Install Default Path\AP158aSuccessfulInstallDefaultPath.cs:line 89

It appears as though the tests start up but the GUI does not launch due to remote display issues or is hidden and cannot be seen by the tests.

Does anyone run GUI tests on a remote windows machine?

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

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

发布评论

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

评论(1

忆梦 2024-09-16 08:31:03

如果您将 Windows 从站作为服务运行,请检查它运行的用户。如果是本地系统帐户,您必须选中允许服务与桌面交互

If you run your Windows slave as a service, check the user that it runs under. It it is the Local System account you have to check Allow service to interact with desktop.

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