TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Selenium Grid

Run Selenium Grid in Background on Linux

Overview

In this tutorial, we will learn the steps involved to Run Selenium Grid in the background on Linux QA lab machines.

When we run the Selenium Grid in the foreground you should be running the terminal window for the grid to be running. A simple Ctrl + C key command can stop the grid and hamper the entire testing process.

$ java -jar <selenium_jar> standalone

Selenium grid foreground

If we close the terminal the Selenium Grid would stop along with it. In the next section, we will see the steps to overcome this issue especially on QA lab machines where the Grid is intended to run without disturbances from the users.

Run Selenium Grid in Background

To overcome these issues, we can run the Selenium Grid in the background with nohup command. Linux nohup command:

https://www.testingdocs.com/nohup-linux-command/

Steps

Launch the terminal and issue the following command

$ nohup java -jar <selenium_jar> standalone & > nohup.out

Selenium Grid with nohup

Note that we are running the grid in the standalone mode. This mode the server emulates all the components itself.( event bus, hub, nodes, router, distributer, sessions, sessionmap). In distributed mode we can invoke each component in the background as well.

This command would make the Grid to run in the background. To see the running grid logs, we can use:

$ tail -f nohup.out

In this example, we are redirecting the output to default nohup.out file. However, we can redirect to any file. For example, we can redirect the output to seleniumGrid.log file.

How to check the process?

We can use the ps utility to check the pid of the Selenium server process. Something like below command should work:

 

Selenium Process List

To kill the process we can use the following command:

$ kill -s KILL <pid>

—

Selenium Tutorials

Selenium Tutorials on this website:

https://www.testingdocs.com/selenium-webdriver-tutorial/

Official Selenium Website:

https://www.selenium.dev/

Related Posts

Selenium Server Error

Selenium Grid /

Selenium Server Error: No drivers have been configured

Selenium4_Grid_Architecture

Selenium Grid /

Selenium 4 Grid Architecture

Selenium4_Grid_Components

Selenium Grid /

Selenium Grid 4.x Distributed Mode

Selenium 4 Standalone Grid

Selenium Grid /

Different Selenium Grid Modes in Selenium 4.0

Docker Compose YAML File

Selenium Grid /

Scalable Selenium Grid with Docker Compose

‹ Scalable Selenium Grid with Docker Compose› Different Selenium Grid Modes in Selenium 4.0

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com