Setup and Run Selenium Tests in Headless Chrome with Jenkins on an AWS EC2 Linux Server

preview_player
Показать описание
This video will explain the following:
- Setup Java, Maven, Git, Chrome Binary and Chrome Driver in AWS EC2 Linux Server
- Configure Java, Maven and Git Tools in Jenkins
- Create Selenium Project from GitHub
- Use Maven Goal as a build step in Jenkins
- Run Selenium Tests in Headless Chrome Browser with Jenkins on a EC2 Linux Server

Prerequisites:
Setup Jenkins on AWS EC2 Server.

AWS EC2 Linux Commands:

Choose correct version of Java:
update-alternatives --config java

Find Java Path:
readlink -f /usr/bin/java

Edit .bashrc file:
vim .bashrc

Enter the following in .bashrc and save the file
PATH=$JAVA_HOME/bin:$PATH

Apply the changes:
source .bashrc

Check if environment variables are set:
$ echo $JAVA_HOME
$ echo $PATH

Install Git:
sudo yum install git -y

Find Git Path:
git --exec-path

Add a repository with a Maven package:

Enter the following to set the version number for the packages:

Install Maven:
sudo yum install -y apache-maven

Find Maven Path:
mvn -version

Install Chrome Driver:
sudo mv chromedriver /usr/bin/chromedriver
chromedriver –version

Install Chrome Binary:
sudo mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
google-chrome –version

---------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

Love it, how easily you explained it, instead of installing chrome driver each time you can also use webdriver manager, it will save alot of your efforts

FarheenAhmad-ooym
Автор

Just what i was looking for. Thanks mate.

kickki
Автор

very informative! thanks for sharing it!

Rajjjjjjjjjjjjjjjj
Автор

Awesome tutorial! Do you know how this process changes if you tried to run python selenium tests in chrome with Jenkins on an EC2 instance?

nabilahmed
Автор

Thanks for the video, I have done my setup but am getting no complier is provided error, where can I find the installed JDK in AWS machine..it's a maven project

girishnair
Автор

Thanks a lot! really helpful. I am executing the script in Ubuntu Linux in azure..Everything works fine .Only issue is its not able to clone repository.Can u get some guidance

gello
Автор

hi how did you install 84 version chrome, its seems in your video also its downloading 86 before you pause. My issue its downloading 85 version, so copied 85 version chrome driver but i am getting this issue( Unable to open X display.
NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
) its not getting resolved after few trails from my end.Any idea Bijan?

i tried,
options.addArguments("window-size=1400, 1500");







but now way still getting
Running runners.TestRunner
Unable to open X display.
NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
Oct 05, 2020 2:13:52 PM checkForError
SEVERE: Process exited with an error: 1 (Exit value: 1)

rajeeshgn
Автор

Hi, can you please tell me what to do ? the chrome version and the binary version is not the same. the chrome binary version is showing 97.0.4692.71. Please help me

SomnathDas-uwbg
Автор

Is it possible to view the Chrome test execution using a VNC connection and XVFB just like how we do in Grid?

gmafsal
Автор

i find that my chrome binary is in latest version but chromedriver is unstable for the binary version

YashwanthSubramanian
Автор

One dout...have u done slave configuration in ec2 machine

shivamohanty
Автор

Bro can we execute cucumber framework using this setup?

victorious_
Автор

nice video, can we configure edge browser ?

mizanur
Автор

Why am I getting error after tests in Jenkins can anyone pls say

Vihaansingh
Автор

The chorme binary link is not working, now showing some error. Can you please provide a new link. It will be helpfull

malleshdollin