[英]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.