Operations 5 min read

Setting Up a Selenium‑Based Web UI Automation Test Environment on CentOS with Multi‑Process Execution

This guide details how to configure a CentOS 7.1 server with GNOME, VNC, Chrome, Python, Selenium and Chromedriver for web UI automation testing, and explains using Python's multiprocessing to run tests concurrently across multiple browsers, dramatically reducing regression time.

360 Quality & Efficiency
360 Quality & Efficiency
360 Quality & Efficiency
Setting Up a Selenium‑Based Web UI Automation Test Environment on CentOS with Multi‑Process Execution

Background : Web UI automation testing often suffers from high maintenance overhead; by applying proper configuration, isolation of locating and operating elements, and leveraging multi‑process execution, maintenance can be reduced and test speed increased.

Environment Setup on CentOS 7.1 :

Install a graphical desktop: $ yum groupinstall "GNOME Desktop" Install and configure VNC server: $ yum install tigervnc-server Copy and edit the service file:

$ cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
$ cd /etc/systemd/system
$ vim vncserver@:1.service

Relevant service sections:

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=autotestuser
ExecStart=/usr/bin/vncserver :1 -geometry 1280x1024 -depth 16 -securitytypes=none -fp /usr/share/X11/fonts/misc
ExecStop=/usr/bin/vncserver -kill :1
[Install]
WantedBy=multi-user.target

Enable and start the service:

$ systemctl enable vncserver@:1.service
$ systemctl start vncserver@:1.service

Verify the port: $ netstat -lntp | grep vnc Install stable Chrome (ensure the Google Chrome repository is configured): $ yum install google-chrome-stable Install pip and Selenium:

$ yum install python2-pip
$ pip install -U selenium

Download and place Chromedriver in PATH (ensure version matches Chrome):

https://sites.google.com/a/chromium.org/chromedriver/home

Additional libraries such as paramiko and requests can be installed as needed.

Multi‑Process Test Execution :

Python's multiprocessing module (e.g., Pool.map) allows defining a function that launches a single browser to run a set of test cases; a list of test suites is passed as the second argument, enabling concurrent execution across multiple browsers.

This approach was applied in the 360 Qiyun project, where three browsers ran different modules simultaneously, significantly shortening regression testing time.

Result : Concurrent UI automation reduces overall test duration and improves efficiency.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PythonSeleniumCentOSmultiprocessingui-testing
360 Quality & Efficiency
Written by

360 Quality & Efficiency

360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.