Is it possible to switch to a single machine with higher configuration and 2 nodes instead of having 2 machines with lower configuration, each containing only 1 node in the Selenium grid?

I am currently utilizing two Windows VMs, each equipped with 2 CPU cores and 8GB of RAM. My tests have been running smoothly using Selenium Grid, with 7 instances of Chrome being run simultaneously across these machines. This setup entails that one machine may host 4 Chrome instances, while the other may have 3 at any given time. Thankfully, I haven't encountered any issues related to memory exhaustion or infrastructure problems on a regular basis. It's worth mentioning that the hub and one node are located on one machine, while the other node is situated on a separate machine.

However, the time has come to retire these two machines in favor of a single machine with superior specifications that will be shared. In light of this, I am considering consolidating to 2 nodes and 1 hub within this new machine and running my tests in parallel (7 instances) across these nodes.

My inquiry pertains to determining the minimum configuration for this new machine to ensure seamless test execution. Additionally, should there be any concerns about having all Chrome instances on one machine with 2 nodes, even if the configuration is robust (e.g. 4 CPU cores and 16 GB of RAM)?

Answer №1

Prior to finalizing the machine setup, it's important to take into account various factors:

The size and complexity of your tests: If your tests demand a significant amount of CPU and memory resources, you may need a higher configuration for optimal performance. Test data volume: If your tests involve large quantities of data, more memory might be necessary to store the data in memory and prevent disk swapping.

If you are utilizing Selenium grid 4, I recommend initially running it in standalone mode on the new machine

java -jar selenium-server-4.8.0.jar standalone

It will automatically identify the number of processors and establish a maximum concurrency limit for the node, providing an indication of the maximum number of tests that can be effectively executed without overwhelming any node.

07:52:43.685 INFO [NodeOptions.getSessionFactories] - Detected 16 available processors

Running all 7 instances of Chrome on a single machine with 2 nodes could lead to a bottleneck, particularly if your tests require substantial CPU and memory resources.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Switching the proxy server within Selenium automation

It appears that everything is functioning properly. fp = webdriver.FirefoxProfile() fp.set_preference("network.proxy.type", 1) fp.set_preference("network.proxy.http", PROXY_HOST) fp.set_preference("network.proxy.http_port", int(PROXY_PORT)) fp.update_pref ...

I am trying to use selenium to download files, but unfortunately, I keep encountering a 401 error

After a recent name change on the website , I am facing difficulties running this code that used to work dynamically through a script daily: from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome ...

Ways to retrieve the CSS class names associated with an element

To determine if an element has been selected, I rely on checking for the presence of an additional CSS class called "selected" that is added to the element The structure of my element is as follows: <div class="b-wide-option" data-bind="css: { selecte ...

Tips for concealing the geckodriver console window?

Currently using Selenium 3.141.0 with python 3.6.7 on windows 10. Despite running the Firefox driver in headless mode, a console window from geckodriver still appears. from selenium import webdriver options = webdriver.FirefoxOptions() options.add_argum ...

Could the sluggishness of Selenium Python with Chrome be attributed to cookies causing issues?

After researching, I discovered that Selenium Chrome may perform better if certain optimizations are applied such as implicit waits, headless mode, usage of ID and CSS selectors, etc. However, before making these adjustments, I am concerned about whether c ...

Python and Selenium experts, seeking advice on the best methods for validating table data

I have a table that I am able to loop through and display the contents of each cell. Now, I am seeking suggestions on how to validate the content of each of the cells within a table that has dimensions of 10 columns by 20 rows. Below is the code snippet f ...

Navigating Through Multiple Windows in Selenium WebDriver

How can I manage multiple windows opened by a single test case simultaneously? More importantly, how do I ensure that the main window remains open while the other windows are closed first? ...

When setting up my profile on Python Selenium, I am unable to retrieve the link

Hello, this is my first time asking a question here. I've been searching for answers on the site but haven't had any luck so far. Could someone please assist me? I'm attempting to open Chrome with my profile, and while it opens correctly, t ...

Creating a function that writes to a file by utilizing the data input from

After running the provided code snippet, it successfully works in a standalone project. However, I am interested in making modifications to replace the variable "sample_text" with an output that is displayed in the terminal instead of being hardcoded int ...

Using Selenium with Python to click and choose values from a dropdown menu

Sample HTML code for the website: <div data-v-c9f77e09=""> User Category: <div data-v-c9f77e09="" class="el-select" style="width: 200px"> <div class="select-trigger el-tooltip__trigger e ...

Select the Amazon image that best matches your search criteria

I'm a beginner with selenium and I recently tried a code that didn't work as expected. You can reproduce this by visiting the Amazon website and searching for "hairclip." You'll come across an image in the search results. My goal is to click ...

Scrapy with integrated Selenium is experiencing difficulties

I currently have a scrapy Crawlspider set up to parse links and retrieve html content successfully. However, I encountered an issue when trying to scrape javascript pages, so I decided to use Selenium to access the 'hidden' content. The problem a ...

Refreshing frequency and reattempts when using selenium on a webpage

I am currently utilizing selenium with python to download a file from a URL. from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_preference('browser.download.folderList', 2) # custom location profile.set_preference(& ...

Unable to find DevToolsActivePort file: SessionNotCreatedException encountered while using Selenuim with Python on Ubuntu 20.04

After setting up Python, Selenium, Chrome, and Chromedriver on my Ubuntu server 20.04, I encountered some errors while running my script This is the python program: # Import request lib from selenium.webdriver.common.by import By from selenium.webdriver.s ...

Exploring methods to discover the execution status of Test suite.xml in TestNG

Is there a way to determine the completion status of TestNG.xml suite execution? I have multiple XML suites that I am running using the following code: testng.setSuites(suite1); testng.run(); After all the threads execute testng.run();, I need to check ...

Steps for initiating the application under test for each test case without the need to generate a new session with WinAppDriver

Currently working on automating a Windows application using Java with WinAppDriver. I have set up three test cases, each requiring the application to be launched. Below is the code snippet I am using to initialize the driver and launch the application: D ...

Unable to access the download archive feature on Facebook by clicking the button

I am currently learning how to use selenium for web automation. My current project involves downloading my Facebook data to my local machine using selenium. However, I have encountered an issue with clicking on the Download Archive Button on Facebook. Here ...

Despite being returned by the method, the instance of the Python selenium driver is still not defined

Currently utilizing Selenium in Python 3.7 with Firefox and the gecko driver. I have a method that invokes another method for site login. The login method creates an instance of the driver, logs in, and then returns the driver instance. However, upon execu ...

Automating a webpage that sporadically appears during the workflow can be achieved using WebDriver

I am in the process of automating a survey workflow that consists of multiple questions on each page. Each page includes several questions as well as a continue button. The next pages are loaded based on the answers provided. What is the best way to auto ...

What is the best way to manage alerts using Python?

I want to manage alerts using Python. Here's what I aim to achieve: Open a URL Submit a form or click on links Verify if an alert is triggered on the new page In the past, I accomplished this task using Javascript with PhantomJS. However, I am now ...