詹金斯在Windows和GUI测试不RDC [英] Jenkins on Windows and GUI Tests without RDC

查看:176
本文介绍了詹金斯在Windows和GUI测试不RDC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们对詹金斯一个主从配置。我们的.NET项目是由运行在Windows上的从詹金斯实例构建的。

We have a master-slave configuration for Jenkins. Our .NET project is built by a slave Jenkins instance running on Windows.

有一堆GUI测试,但他们似乎只是运行,如果有一个远程桌面连接(RDC)会议开幕。

There are a bunch of GUI tests, however they only seem to run if there's a remote desktop connection (RDC) session open.

当试图运行无RDC测试,詹金斯不显示在测试的任何进展。然后,不过,我连接到​​从机的桌面,可以看到应用程序的主窗口中启动,但用户界面测试框架(白色)不能执行任何操作。

When trying to run the tests with no RDC, Jenkins doesn't show any progress in testing. Then, however, I connect to the Slave's desktop and can see the main window of the application launched, however the UI testing framework (White) cannot perform any actions.

詹金斯从站通过Java Web Start启动。

The Jenkins slave is launched via Java Web Start.

我读了几个网站,不幸的是它不能够在不RDC会话中运行的GUI测试。

I read on several websites that unfortunately it is not possible to run GUI tests without RDC session.

我只是想确认它是真实的,不知道是否有任何解决方法。

I just want to confirm that it is true and wonder if there is any workaround.

推荐答案

您从机必须要在台式机前的测试可以正常运行。我们有同样的问题。

Your slave machines have to be at a desktop before the test can run properly. We had the same problem.

解决方案是让试机启动和自动登录到桌面。为确保测试只会启动​​后,桌面上是可用的,我们增加了一个计划任务,设置为用户登录时运行,将推出通过Java Web Start詹金斯奴隶。这样一来,詹金斯将只能看到一次从桌面正在运行。在那之后,一切正常。

Solution was to have the test machine start up and auto-logon to the desktop. To ensure that the test would ONLY start after the desktop was available, we added a scheduled task, set to run at user login, that would launch the Jenkins slave via Java Web Start. That way, Jenkins would only see the slave once the desktop was running. After that, everything worked fine.

这篇关于詹金斯在Windows和GUI测试不RDC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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