简体   繁体   English

如何强制在 jenkins 从节点上运行的 Selenium 测试在前台运行?

[英]How can I force Selenium tests running on a jenkins slave-node to run in the foreground?

I have a CentOS server running a Jenkins server that has a connection to slave-node running windows server 2016. the Jenkins server has a job that is configured to run a series of Selenium tests on the slave-node. I have a CentOS server running a Jenkins server that has a connection to slave-node running windows server 2016. the Jenkins server has a job that is configured to run a series of Selenium tests on the slave-node.

for the launch method of the slave-node configuration i am using "Launch Agent by connecting it to the master" and I've setup the slave-node create the connection on startup.对于从节点配置的启动方法,我使用“通过将代理连接到主节点来启动代理”,并且我已经设置了从节点,在启动时创建连接。

the tests can run successfully but when I remote into the windows-slave node via RDP and start the build from the Jenkins server I am unable to see a browser launch and show see the Selenium test interact with the webpage unless I re-lauch the slave-agent within the Remote Desktop connection.测试可以成功运行,但是当我通过 RDP 远程进入 windows-slave 节点并从 Jenkins 服务器开始构建时,我无法看到浏览器启动并显示看到 Selenium 测试与网页交互,除非我重新启动从站-远程桌面连接中的代理。

I have tried to running the Jenkins slave-agent as a windows service and also tried starting it with a batch script running at startup but I get the same result.我尝试将 Jenkins 从代理作为 windows 服务运行,并尝试使用在启动时运行的批处理脚本启动它,但我得到了相同的结果。

java -jar agent.jar -jnlpUrl http://{Jenkins Server URL}/computer/{Jenkins Node}/slave-agent.jnlp

is there any way to have the slave-agent run at start-up but also have Desktop interaction when the when I start the Selenium test from a Jenkins build?当我从 Jenkins 构建开始 Selenium 测试时,有什么方法可以让从代理在启动时运行,但也可以进行桌面交互?

Did you try launching the agents using JNLP through windows task scheduler?您是否尝试通过 windows 任务调度程序使用 JNLP 启动代理? For trigger you can select multiple options including launch the agent when some one logs into through the RDP session.对于触发器,您可以使用 select 多个选项,包括当有人通过 RDP session 登录时启动代理。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有可能在没有活动桌面和Jenkins奴隶的情况下运行Selenium测试? - Is it possible run Selenium test without active desktop and Jenkins slave? 如何在启动时在前台运行UWP应用程序? - How can I run an UWP app on foreground at startup? 在Windows上使用Jenkins运行Selenium测试时,如何在未实际登录到计算机时捕获屏幕截图? - How to capture a screenshot when not actually logged into the machine during running Selenium tests with Jenkins on Windows? 当我的脚本运行的节点是 jenkins 管道脚本时,如何调用 REST API 管道脚本? - How can I call a REST API from jenkins pipeline script when the node my script run is? 在Windows Jenkins从站上,如何解决“在当前项目和插件组中未找到前缀为'http'的插件”? - On a windows Jenkins slave, how can I solve “No plugin found for prefix 'http' in the current project and in the plugin groups”? 运行jenkins slave作为服务jenkins 2.89 - Running jenkins slave as service jenkins 2.89 Jenkins Windows奴隶在线但没有构建运行 - Jenkins windows slave online but no builds running Jenkins Windows从属节点上无法识别'mvn'命令 - 'mvn' command not recognized on Jenkins Windows slave node 如何在Jenkins-slave(Windows)上执行bash命令? - How to i execute bash commands on jenkins-slave (windows)? Jenkins Windows slave:如果作为服务运行,则身份验证失败 - Jenkins Windows slave: Authentication failed if running as service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM