Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Eggplant Functional: Automatically Run Selenium Standalone Server on Windows

DZone's Guide to

Eggplant Functional: Automatically Run Selenium Standalone Server on Windows

This tutorial will show you how quick it is to fully automate the execution of Selenium WebDriver tests through Eggplant Functional.

· DevOps Zone ·
Free Resource

Discover the all-in-one test automation solution that increases quality and shortens release cycles with the most challenging applications.

To fully automate the execution of Selenium WebDriver tests through Eggplant Functional, it's convenient to set up the Selenium Standalone Server to run automatically every time the system under test boots. If the Standalone Server isn't running, the test will not execute, leading to delays in continuous integration, and false-negatives on regression testing.

From Testplant, Option A: WebDriver installation package, copy the file called RunSeleniumServer.bat to the Startup folder.

Depending on your operating system, the Startup folder may be located at:

  • C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Windows 8/10)
  • C:\Documents and Settings\UserName\Start Menu\Programs\Startup (Earlier Windows)

Option B: To manually create a batch file for a Selenium Standalone Server installation

  1. Create a file and type the following line into the file:
    set JAVA_HOME = "<C:\program files\path\to\java="">\bin" "%JAVA_HOME%\java" -jar C:\Path\To\Selenium\selenium-server-standalone-3.6.0.jar
  2. Be sure that the version number for the jar file matches the one that you have installed
  3. Save the file to the Startup folder and name it RunSeleniumServer.bat. Depending on your operating system, the Startup folder may be located at:
    • C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Windows 8/10)
    • C:\Documents and Settings\UserName\Start Menu\Programs\Startup (Earlier Windows)

Now every time the machine restarts, the batch file will run, launching the Selenium Standalone Server. For more details, see our documentation on the Selenium WebDriver integration.

Can you release faster without sacrificing quality? See how with our free ebook Strategies for a Successful Test Automation Project and a free trial of Ranorex Studio today!

Topics:
devops ,selenium ,tutorial ,selenium webdriver

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}