23

Can anyone please explain the difference between "selenium server" and "selenium server standalone" jars and use of both.

Which one to prefer? When to use which one?

user1
  • 945
  • 2
  • 13
  • 37
Kiran
  • 241
  • 1
  • 2
  • 3

6 Answers6

13

As per Selenium Documents,

You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If you will be only using the WebDriver API you do not need the Selenium-Server. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.

There are some reasons though to use the Selenium-Server with Selenium-WebDriver.

  1. You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
  2. You want to connect to a remote machine that has a particular browser version that is not on your current machine.
  3. You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver.

Here is a photo from the old version of selenium website:

selenium server old page

MasterJoe
  • 2,103
  • 5
  • 32
  • 58
Chetan
  • 2,360
  • 3
  • 18
  • 33
  • 10
    Chetan.. Thanks for the answer. But i was looking for the difference between "selenium server" and "selenium server standalone" , to make my question more clear, i know we can use both the jars to use Grid. But in which case one should opt which one. – Kiran Oct 03 '13 at 10:35
  • Hi kiran, this will helpful to you https://groups.google.com/forum/#!topic/selenium-users/DlAIGAz5v4o – Chetan Oct 03 '13 at 10:53
  • 1
    Selenium RC :- Need Selenium Stanalone jar for single machine & for Grid Need both the jars. Selenium Webdriver :- No need of any file for Single Machine & for Grid need only selenium Server jar. – Chetan Oct 03 '13 at 11:07
  • Chetan, if i use only selenium server jar, how would i instantiate my hub and node. Using Selenium Stanalone jar i know how to do it (using java -jar command). small example would be a great help... Thanks a lot for above reply.. – Kiran Oct 03 '13 at 11:41
  • 1
    My recommendation is that, Use selenium Webdriver so you no need of Standalone jar for local & for Grid only needed selenium server jar. also selnium RC is outdated from market. if my answer is helpful to you then accept it also +1. – Chetan Oct 03 '13 at 12:11
  • This in **NOT** answer to the question OP asked. OP asked difference between `selenium server` and `selenium server standalone` jars. Answers explain difference between `selenium server` and `webdriver`. Which is nice to know but irrelevant. No idea why it was upvoted at all – Peter M. - stands for Monica May 31 '17 at 19:49
  • @PeterMasiar so give your best answer, will be more helpful for all of us. – Chetan Jun 05 '17 at 07:13
3

Selenium Server is formerly known as selenium RC server.

I can not say exact selenium server standalone definition, but i can say based on the version

In the selenium server standalone server is different

swathi
  • 31
  • 1
3

I believe that "selenium server" jar IS "selenium server standalone" jar. If you look at http://www.seleniumhq.org/download/ - there is not such thing as "selenium server".

Grid and RC servers are in the same jar file. RC ("Remote Control") is deprecated in Selenium 2 and emulated in Selenium 3.

Lazily, "selenium server standalone" can be called just "selenium server", because that's what it is: proxy to selenium grid or whatever remote browsers you want to automate. "standalone" is HTTP server.

http://www.protractortest.org/#/infrastructure hints at difference in terminology: it is "standalone" when running locally, and "server" when running (standalone jar) on remote grid (which is a http server assigning jobs to multiple selenium servers, each running "standalone" jars).

2

If one enters via the Getting Started page at the Selenium Wiki, there is a download link to selenium-release.storage.googleapis.com. E.g. the 3.8 release directory features:

[DIR]   selenium-server-3.8.1.zip               2017-12-01 19:21:38 20.58MB 
[DIR]   selenium-server-standalone-3.8.1.jar    2017-12-01 19:17:06 21.79MB 

So there are indeed two versions. It seems a matter of packaging:

The selenium-server-3.8.1.zip contains a file selenium-3.8.1-nodeps.jar and the dependent classes as .jar files ("jars in zip"):

   ..
  ---x------     63504   1-Feb-1985  00:00:00  libs/jcommander-1.48.jar
   ..
  ---x------    857721   1-Feb-1985  00:00:00  selenium-3.8.1-nodeps-sources.jar
  ---x------   2137810   1-Feb-1985  00:00:00  selenium-3.8.1-nodeps.jar

while the selenium-server-standalone-3.8.1.jar contains the dependent classes and its own classes as direct entries ("class files in jar"):

  ..
 -rw-rw-rw-      1014  10-Apr-2015  19:45:56  com/beust/jcommander/DynamicParameter.class
 -rw-rw-rw-       237  10-Apr-2015  19:45:56  com/beust/jcommanderFuzzyMap$IKey.class
 -rw-rw-rw-      2910  10-Apr-2015  19:45:56  com/beust/jcommander/FuzzyMap.class
  ..
mvw
  • 5,075
  • 1
  • 28
  • 34
1

Selenium is an opensource, web application automation testing tool suite which provides cross platform and cross browser automation facility.

Selenium is composed of multiple software tools that includes:- (1). Selenium IDE, (2). Selenium RC, (3). Selenium WebDriver, (4). Selenium Grid

Coming to the Selenium Server, The Selenium Server is a Selenium RC(Remote Control) component that which launches and kills browsers, interprets and runs the Selenese commands passed from the test program, and acts as an HTTP proxy, intercepting and verifying HTTP messages passed between the browser and the AUT(Application Under Test).

So, Selenium Server is needed to run Selenium RC and Selenium WebDriver tests remotely over multiple machines or VMs using Selenium Grid.

And the Selenium Server Standalone is a bundled jar that contains WebDriver API, Selenium Server and the Selenium Grid for running the tests locally and remotely across many platforms and browsers.

Ali
  • 1,689
  • 1
  • 5
  • 12
1

The Selenium Server is needed in order to run Remote Selenium WebDriver. Selenium 3.X is no longer capable of running Selenium RC directly, rather it does it through emulation and the WebDriverBackedSelenium interface.

see https://docs.seleniumhq.org/download/

So,if you use Selenium RC,the Seleniium Server is what you need.if you use Selenium 3.X and update,selenium-server-standalone is what you need.I have the same question and i find the answer.

thouger
  • 385
  • 2
  • 8