【问题标题】:How to troubleshoot White getting 'stuck' on build server?如何解决 White 在构建服务器上“卡住”的问题?
【发布时间】:2012-05-09 13:01:49
【问题描述】:

我有一个使用 White 的 GUI (winforms) 测试,它在开发中运行良好,但在构建服务器上卡住了。

它可以正常打开应用程序,但只要我尝试“做”任何事情:

Button Button = Window.Get<Button>("btnCalculate");
Button.Click();

卡住了。服务器报告:

---- White.Core.UIItems.UIActionException : Window in still wait mode. Cursor: White.Core.InputDevices.MouseCursor, after waiting for 5000 ms
   at Bricks.RuntimeFramework.ReflectedObject.Invoke(MethodInfo methodInfo, Object[] arguments)
   at Bricks.DynamicProxy.DynamicProxyInterceptors.Process(IInvocation invocation, InterceptContext interceptedContext)
   at White.Core.Interceptors.CoreInterceptor.Intercept(IInvocation invocation)
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at ButtonProxy6fcb23ab82174f67960e33c02ddb2259.Click()
   at WinCalc.Gui.Test.AcceptanceTests.WhiteTest() in d:\BuildServer\Agent\work\f00b471a939c7f96\WinCalculator\WinCalc.Gui.Test\AcceptanceTests.cs:line 39
----- Inner Stack Trace -----
   at White.Core.UIItems.Actions.Action.<Handle>b__2()
   at Bricks.Core.Clock.Perform(Do do, Matched matched, Expired expired)
   at White.Core.UIItems.Actions.Action.Handle(Window window)
   at White.Core.UIItems.WindowItems.Window.ActionPerformed(Action action)
   at White.Core.InputDevices.Mouse.ActionPerformed(ActionListener actionListener)
   at White.Core.InputDevices.Mouse.Click(Point point, ActionListener actionListener)
   at White.Core.UIItems.UIItem.PerformClick()
   at White.Core.UIItems.UIItem.Click()

我从哪里开始尝试调试这个?

(我已经让它在另一台服务器上工作,所以我不相信这是我的代码,它是新服务器上的设置)。

【问题讨论】:

    标签: teamcity white-framework build-server


    【解决方案1】:

    这个问题很可能是因为构建代理上的服务因为没有桌面而无法真正创建窗口。

    您可以尝试的第一件事是在 teamcity 构建代理服务设置中确保“允许服务与桌面交互”。被检查。然后重启服务,再次尝试运行测试。

    在过去,尽管我与该解决方案的结果不一致。我真的不知道原因的来龙去脉,但如果这不起作用,您可以在登录到该框时尝试在命令行中运行 Team City 代理。这肯定可以工作,如果您保持桌面正常运行,您可能会看到您的 Windows 已创建并在测试期间执行所需的任何操作。

    【讨论】:

    • 感谢您的回答。选中了“允许服务与桌面交互”,所以这不是问题。该项目目前已“停放”,但当我有时间时,我会尝试您的命令行建议。
    猜你喜欢
    • 2014-03-05
    • 2019-12-19
    • 1970-01-01
    • 2015-03-31
    • 2014-07-01
    • 2022-06-16
    • 2011-02-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多