简体   繁体   中英

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.

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.

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.

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?

Did you try launching the agents using JNLP through windows task scheduler? For trigger you can select multiple options including launch the agent when some one logs into through the RDP session.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM