-1

I am planning to write Selenium tests for my application and want them to run on a wide variety of browsers and versions. I am also planning to use a virtualisation service such as SauceLabs or TestingBot.

However, as far as I can tell there are a number of different Selenium components such as:

  • Selenium WebDriver itself
  • Chrome Driver
  • InternetExplorer Driver
  • Opera Driver
  • Safari Driver
  • etc

Furthermore, I read in articles like https://support.saucelabs.com/customer/portal/articles/2005317-default-selenium-version-for-each-firefox-browser-version that you might be best advised to change the versions of these to get better compatibility depending on the version of the browser you are targeting.

I am confused as to whether I need to have different versions of Selenium and other components installed locally OR should I just have the latest version of Selenium WebDriver installed locally, SauceLabs/TestingBot will have specific versions on their VMs and the two will magically work together?

Thanks for any advice!

gordonm
  • 159
  • 1
  • 14
  • To test on a Selenium grid, you don't need to run a selenium node/server/jar file. All that's needed is a Selenium RC/Webdriver script that points to the grid. – Jochen Nov 01 '15 at 11:42

1 Answers1

1

If you're executing on the cloud, be it Sauce, TestingBot, BrowserStack, etc., you won't need to have the Selenium server or any of the browser drivers installed locally.

That being said, however, I would advise keeping the standalone server along with chrome-driver and the IE driver (and/or any other browser drivers you need) installed locally for debugging tests under development. It's much easier while you're coding to run a test on your own machine and get it to the point where it's working as expected prior to committing. You can then use Sauce or whatever cloud hosted grid solution for your official test runs.

I typically just have the most recent versions installed locally, but this could be different for you based on your requirements. At work, I develop automated tests for internal applications. All of our users are all on the same pre-configured Windows image with the same browsers/versions. As such, I only need to worry about the supported platforms in my tests. If you're working with a public-facing application, you might consider referring to the supported browser/versions for the application. Juggling different versions of the same browser on a local machine can get pretty tedious, so even then, if I were in that situation, I'd likely configure my machine to the most common platforms and execute locally while in development, then use something like Sauce for executing on specific platforms. In short, I like to keep my local environment as clean and simple as possible, and let Sauce do the heavy lifting of managing all the different browser/version/os combinations for me.

Jochen
  • 1,643
  • 3
  • 17
  • 26
tim-slifer
  • 1,028
  • 1
  • 9
  • 17
  • Thanks tim-slifer. That's very clear about the browser drivers. I do get a bit confused when we talk about Selenium Server vs client though (although I do understand the difference between a server and a client!). When I download from here: from the section titled "Selenium Client & WebDriver Language Bindings" those are the main C# bindings I use. Should I just always keep those as up-to-date as possible? Will there every be a need to use other versions for better compatibility when running on SauceLabs/TB/BrowserStack? – gordonm Nov 01 '15 at 10:08
  • As far as updates, it depends on the project, personally. Most of my projects are updated as soon as new Selenium libraries are released. In a situation where I maintain an internally hosted Selenium Grid, I coordinate the updating of the Selenium library with upgrades to the Grid to ensure a version match (though, I try to keep this delay as minimal as possible). I've never experienced any difficulties so far with various Selenium library version when executing on SauceLabs. – tim-slifer Nov 01 '15 at 20:22
  • As a side recommendation, I would recommend using Nuget in your C# project to manage the selenium dependencies for you. I've found it much easier than manually downloading and importing into my projects. – tim-slifer Nov 01 '15 at 20:25