Session 10 - Setup Docker Selenium Grid | Run Automation on Docker Containers | Selenium on Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024
  • Automation Framework Design Series - Selenium With Java.
    ▶️ In this session 10, we will see step by step process for "How to Setup Docker Selenium Grid and Run automation on docker containers". Selenium Tests Parallel execution on Docker Selenium Grid
    Steps -
    Install docker application on your system
    Start the docker desktop app
    Setup Docker Selenium Grid
    Create and run Hub and Node containers using docker compose
    Implement code changes in Framework for RemoteWebDriver
    Run automation and do live monitoring
    Scale the containers to run tests in Parallel Mode
    1. Use docker commands
    Hub-- docker run -d -p 4445:4444 --net grid4network --name seleniumHub selenium/hub:4.9.0
    Node-- docker run -d -p 4446:5900 --net grid4network -e SE_EVENT_BUS_HOST=seleniumHub -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm_size=2gb --name chromeNode1 selenium/node-chrome:4.9.0
    2. Use docker-compose.yml file
    docker-compose up
    For different file name use this command-
    docker compose -f SetupSeleniumGridLatest.yml up
    Thanks for watching! Happy coding and automating!
    ▶️ If you have any queries , questions or suggestions, please add in the comment. I will be happy to hear suggestions and feedback from you so that I can improve the same. Help your friends to learn automation by suggesting the channel. Thanks
    ======================================
    ***************AJ AUTOMATION*************
    ======================================
    Hi guys, Please share and Like the content whichever you find informative to reach more beginner candidates learning Test Automation. Thanks for your Support !!
    🔔 Learn automation from basic !! 🔔
    ✅ Let's Learn the Concept in 5 To 10 Mins :=
    • Test Automation Interv...
    ✅ Selenium series videos Playlist :=
    • Selenium tutorial for ...
    ✅ Maven Tool videos playlist :=
    • Maven Tool - Learn Bas...
    ✅ Selenium WebDriver Exceptions Playlist :=
    • Selenium WebDriver Exc...
    ✅ Selenium Grid With Docker:==
    • Selenium Grid With Doc...
    ✅ Jenkins Tool Series :==
    • Jenkins Tool Sessions ...
    ✅ Upload and Download Files in Selenium :=
    • Selenium WebDriver - U...
    ✅ Excel and CSV files operations :=
    • Excel and CSV -- Read ...
    ✅ Java Language Concepts :=
    • Java Language Concepts...
    ✅TestNG Framework Videos:=
    • TestNG Introduction an...
    ✅ Become Master in Xpath:=
    • Xpath Introduction
    ✅ Protractor series videos playlist :=
    • Let's Learn Protractor...
    ✅ Recent Uploads :=
    • Recent Uploaded Videos
    ✅ GitHub Repo:= github.com/aja...
    ⚡️ Thanks for your support !! ⚡️
    ======================================
    *************** Thanks for watching !!*************
    ======================================
    ⚡️ Keep Learning...Keep Sharing...Keep Growing. ⚡️
    #Automation
    #testautomation
    #SeleniumWebDriver
    #javatestingframework
    #seleniumautomachinetesting
    #seleniumwebdriver
    #seleniumautomation
    #testing
    #seleniumtutorialforbeginners
    #automationframework
    #seleniumframework
    #softwaretesting
    #java
    #testng
    #eclipse
    #maven
    #selenium4
    #seleniumtutorials
    #seleniumjava
    #seleniumautomation
    #docker #dockertutorial

ความคิดเห็น •

  • @thehiddenbalkans
    @thehiddenbalkans 2 หลายเดือนก่อน +1

    can i use them in one container?
    Selenium 4.25.0
    installing Chrome and chrome driver inside the container via Dockerfile
    I want to run three containers with this code going to different links (input param env var)
    `but i am getting
    Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
    (session not created: DevToolsActivePort file doesn't exist)
    (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

    • @AJAUTOMATION
      @AJAUTOMATION  หลายเดือนก่อน

      This might happen due to incorrect setup in dockerfile.. can you share Dockerfile , also check u have sufficient resources like cpu , RAM memory etc.

  • @priteshkhambekar
    @priteshkhambekar 2 หลายเดือนก่อน

    Hi Sir,
    In my framework I did a setup to execute selenium script into docker containers.
    Here when I run my testng.xml file then all the scripts are executing successfully into docker containers.
    But the problem is when I run same script using maven command I.e mvn clean test then it's throwing an errors.
    Do you know why?
    If possible could you please try to execute script into docker container using maven command and see if it's executing successfully or not?
    Thanks

    • @AJAUTOMATION
      @AJAUTOMATION  2 หลายเดือนก่อน

      yes its working , what's the error you are getting with maven command ?