Pages

Monday, April 2, 2012

Browser not shown while executing Selenium tests in Hudson

While executing the Selenium tests in Hudson, you might have noticed following:

1) Browser window is not shown
2) Execution is halted while performing an action like a click event
3) Execution halts due to unexpected pop-ups which needs user interaction

The solution for this is to launch the Hudson Slave in console mode i.e.. from command prompt.

Here are the steps:

SOLUTION1:

1) Stop Hudson Slave service
2) Change the Hudson Slave service to Manual
3) Restart the machine
4) From Command prompt, go to hudson home directory and execute following command

java.exe -Xrs -jar "slave.jar" -tcp port.txt

SOLUTION2:

Launch the slave as JNLP slave:

1) Go to the slave machine.
2) Execute following command:
java -jar slave.jar -jnlpUrl http://&lt;<url_to_master>&gt;/computer/&lt;<name_of_slave>&gt;/slave-agent.jnlp
ex: java -jar slave.jar -jnlpUrl http://machine1:8080/computer/machine1/slave-agent.jnlp

No comments:

Post a Comment