Difference between Selenium Standalone server and Selenium server
By Neha Vaidya, Community Contributor - March 13, 2020
What is a Selenium Standalone server?
Selenium Standalone server is a java jar file used to start the Selenium server. It is a smart proxy server that allows Selenium tests to route commands to remote web browser instances. The aim is to provide an easy way to run tests in parallel on multiple machines.
Before going any further, let’s take a moment to understand what a Selenium jar is.
To use a Selenium Grid, one can download the selenium-server-standalone JAR file. All the components are available through selenium-server. The standalone JAR contains the remote Selenium server and the client-side bindings which let you perform the testing without the need for any specific jar files.
If you are creating a Maven-based project, then include the following dependencies in pom.xml file
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>3.X</version> </dependency>
Also, you can download the server from the official selenium page and start the server through command line using the command below:
java -jar selenium-server-standalone-3.11.0.jar
Once the server is up and running, execute the test cases. Either proceed with the Selenium Grid setup and perform testing on Grid or run tests with Selenium WebDriver.
Advantages of Selenium Standalone server
- Allows test distribution over a remote machine or multiple machines.
- Performs automation testing on different browsers with different versions.
- A single server performs all the tasks without the help of external drivers.
What is Selenium Server?
Selenium Server is essential to execute Selenium RC tests and WebDriver tests in remote machines through Selenium Grid. Selenium WebDriver is used to perform automation testing of various web-applications against various browsers.
Selenium Server is essentially based on how one intends to use Selenium WebDriver.
While creating a session with the Selenium Server, one must send its desired capabilities. These capabilities provide the Selenium Server with necessary information such as which browser and operating system to use. The Selenium Server then handles all the requests from the BrowserDriver. This also includes automatic shutting down if something goes wrong during a test.
Note: Selenium server is mainly used for the Selenium RC functionality which is now deprecated. Also, there is no such server available for download. To run tests using a remote Selenium Server, one needs an account with a service that hosts the server (and the browser drivers). One such service is BrowserStack.
Advantages of Selenium Server
- Offers in-built test report generation
- Allows cross browser testing
- Controls the browser at the OS level
By gaining clarity on the difference between Selenium Standalone server and Selenium server, testers can use this selenium automation tool (the most popular in the world) with greater levels of sophistication. This article provides this information in some detail so that testers can begin to do so as early as possible.