I have to run selenium scripts in multiple browsers like Chrome, IE, FF, etc. How can I parameterize these browsers from Jenkins.
2 Answers
You need selenium-grid in order to run on several browsers. It might be cumbersome to setup selenium grid on various OS and OS versions depending on the requirement and it requires some effort to keep up and maintain that infrastructure as well.
Instead I would suggest to use providers like www.saucelabs.com who provide almost all widely used OS + versions + browsers as a service and based on your language of choice to write the tests, there are APIs to get the job done.
If you are curious to learn and maintain a selenium grid on your own, here is a quick sample using docker containers.
Comments
We use selenium with Jenkins in our company and what we do is to use docker containers.
Launch the browser with this command
docker run -d -p 4444:4444 selenium/standalone-firefox
Then run your script using a remote web driver for each browser.
Regards