Setup Selenium Hub as a Service in Ubuntu 14.04
Setup Selenium Hub as a Service in Ubuntu 14.04:
If you have moved to Ubuntu 16.04, kindly refer to this link.
Setting up selenium hub as a service saves you from the tedious task of running long commands to start and restart the selenium server several times during your development. Also, this ensures that you grid is always up and running and you don't have to bring it back up every time your machine\automation server gets rebooted.
If you have moved to Ubuntu 16.04, kindly refer to this link.
Setting up selenium hub as a service saves you from the tedious task of running long commands to start and restart the selenium server several times during your development. Also, this ensures that you grid is always up and running and you don't have to bring it back up every time your machine\automation server gets rebooted.
- Run the below command to create selenium server config file. Enter your password if asked.
- Paste the below content in this config file.
respawn
exec java -jar /opt/softwares/selenium-server.jar -role hub -port 4444
- Press Ctrl+X followed by Y and Enter to confirm saving the changes to the file
- Now create a symbolic link of this config file at destination /etc/init.d/selenium by running the command
- Run the below command to start the selenium hub service.
Tips:
- Every time you want to restart the grid you can just run sudo service selenium restart
- You can also configure any additional parameters you might have along with you java -jar /opt/softwares/selenium-server.jar -role hub -port 4444 command during creation of selenium.conf file.
Comments
Post a Comment