How to Setup Selenium Grid On Docker

Sdílet
Vložit
  • čas přidán 26. 08. 2019
  • In this video, we are are going to discuss How to Setup Selenium Grid On Docker.
    Selenium Grid Video- • Selenium Grid Tutorial...
    github.com/SeleniumHQ/docker-...
    Commands for Docker
    docker run -d -p 4545:4444 -name selenium-hub selenium/hub
    docker run -d -P -link selenium-hub:hub selenium/node-chrome-debug
    docker run -d -P -link selenium-hub:hub selenium/node-firefox-debug
  • Věda a technologie

Komentáře • 89

  • @nitishbhardwaj2053
    @nitishbhardwaj2053 Před 3 lety +4

    Thanks Mukesh....You and Naveen is builder of my Career

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety +2

      Thank you Nitish for following us :) Keep learning.

  • @AbhishekMishra-ru2fi
    @AbhishekMishra-ru2fi Před 4 lety +1

    Great champion.Please cover all topics . Cant wait to learn everything about Docker.

  • @SameerKumar-yu1xi
    @SameerKumar-yu1xi Před 4 lety +1

    Thank you for making docker simpler for us to learn...

  • @CasioArtist
    @CasioArtist Před 4 lety +1

    Thanks Mukesh...for sharing this...

  • @pedrorodriguez628
    @pedrorodriguez628 Před 3 lety +1

    Thank you very much, great video.

  • @mayurchaudhari1111
    @mayurchaudhari1111 Před 3 lety +3

    @Mukesh Otwani Thanks for the video. I always love watching your videos. Just to Highlight the exact issue caused around 12.27 min was, a container with the same name already present and it was not running but allocated the same name which you were passing at the time of running the new container. If you would have changed name while running the new container that also could have done the task. But it's also ok that you removed the container and created a new.

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety +2

      Thanks Mayur, noted your point.

    • @mayurchaudhari1111
      @mayurchaudhari1111 Před 3 lety +1

      ​@@Mukeshotwani Love your dedication man. Want to meet you once for a DevOps talk.

  • @ramkumariyer8282
    @ramkumariyer8282 Před 3 lety +1

    This was very useful . I was able to setup grid with multiple chrome nodes too . But my main concern is when i was running the entire thing in VM with batch files the execution was faster but in this approach with Docker my tests are running very slow and are getting time out / element not found issues . Do you have any suggestions for that ?
    I created 1 HUB with Multiple (Say 10 Chrome Nodes) and executed them with batch files . They are working well but running very slow .

  • @prachijoshiporwal3353
    @prachijoshiporwal3353 Před 4 lety +1

    To run restassured api selenium automation projects on docker ...is that possible only through selenium grid ?

  • @geladamoria425
    @geladamoria425 Před 3 lety +1

    thanks a lot

  • @nikhilgupta5721
    @nikhilgupta5721 Před 4 lety +1

    Thanks Mukesh. It will be very good if you share video on how to shut and start all nodes before and after the execution with running only one file before starting the testng.xml most of the time what happens you know node is not in the up conditon or it got hanged. Also try to show distributing 25 test cases considering 5 selenium-chrome-node and distributing 5 each test cases at the same time on all 5 nodes registered with hub.

  • @ramanrayat
    @ramanrayat Před 4 lety

    Hi Mukesh it is nice tutorial can you please help me for reporting part, how to generate/save report and screenshot ?

  • @jayakrishnank4001
    @jayakrishnank4001 Před 3 lety +2

    Hi Mukesh, How can we run docker file and execute cases through Jenkins

  • @Mohammed-yi1ku
    @Mohammed-yi1ku Před 4 lety

    Hi Mukesh,
    I am using Win 10 HOME with a docker toolbox installed.
    Here from the docker quick terminal, I able to run the below command successfully but not able to launch the local host to see selenium-hub running...
    docker run -d -p 4546:4444 --name selenium-hub selenium/hub
    localhost:4546

  • @prashantht.v8289
    @prashantht.v8289 Před 4 lety +1

    Hi Mukesh, Very good video as usual, And you make it so easy. I have one question wrt docker image which you installed. Does the Docker image "Selenium/hub" contain all the required software to run selenium script like "Selenium Server", " Maven" "TestNG" etc as well apart from Selenium Hub(grid).

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Hi Prashanth, Docker will only create run time environment for you with grid installed. Maven, TestNG and jenkins are not part of it.
      You just need to provide hub url in your test and it will run on docker container.
      I would also recommend you to try czcams.com/video/PEjUCkNft7s/video.html

    • @prashantht.v8289
      @prashantht.v8289 Před 4 lety

      @@Mukeshotwani Thanks Mukesh,So Docker is used in selenium automation only for Grid usage and running on multiple browsers is it?

  • @uhsay1986
    @uhsay1986 Před rokem +1

    Hi Mukesh, is vmc viewer used in corporate projects ? Or there is a different practice

  • @MoMsSpace
    @MoMsSpace Před 4 lety +1

    Hi mukesh, can you post a video on how to run leanft tests with docker.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Richa, never worked on leanft so do not have any idea on this 🙁

  • @CasioArtist
    @CasioArtist Před 4 lety +1

    I tried all the steps on Windows 10, every thing worked fine. Onlything that differed was, in vncviewer i had to enter localhost: to connect to the node.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Thanks Pankaj will add this point in the description.
      Also check Zalenium which is autoscalling containers.

    • @CasioArtist
      @CasioArtist Před 4 lety

      @@Mukeshotwani sure will check...

    • @CasioArtist
      @CasioArtist Před 4 lety

      @@Mukeshotwani I have started using Zalenium and it feels like i am using mini version of BrowserStack or SauceLab. Awesome !

    • @CasioArtist
      @CasioArtist Před 4 lety

      @@Mukeshotwani I have one query , how to see the live execution of test cases from VNC Viewer. Can i see it ? Or only i can see post execution in the localhost:4444/dashboard/# ? I could not get the port number of the nodes...I am running all my Tests on Windows 10

    • @CasioArtist
      @CasioArtist Před 4 lety

      Also , i have one query, how to share the zalenium execution dashboard with my team, on slack or email? so that they can see the execution dashboard. Currently i am sending the html report (TestNg/Extent Report) from Jenkins ( post execution)

  • @bhadmusautomates
    @bhadmusautomates Před 4 lety +1

    Hi Mukesh,
    Please I see that this video covers setup with Java. I need a guide on how to setup with Python. Can you help with the things I might need to change?

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Ademola, I have not tried with python yet. I will try to make video on python too.

  • @cyrilgeorge870
    @cyrilgeorge870 Před 4 lety +1

    It will be nice if u show implementing bdd framework selenium grid with the help of docker.most of the utube channels using testng cucumber getting ignored

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Sure George, I will start Cucumber series just after this.
      Docker basically providing platform so when we run our BDD framework as well current docker setup will remain same.

  • @anitashaw5479
    @anitashaw5479 Před 4 lety +1

    Hi Mukesh, I am using windows 10 pro, and installed Docker desktop and able to download the images but could not able to link the node to running hub. I searched in Google with this error but no luck. Could you please give any hints on the same. Waiting for your reply

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Anita, please use Zalenium for auto grid setup czcams.com/video/PEjUCkNft7s/video.html

  • @ashwinnetalkar2992
    @ashwinnetalkar2992 Před 4 lety +2

    Hi Mukesh can we use docker to run mobile test automation on a virtual machine?

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Ashwin, I haven’t tried mobile part but seems can be done because they have provide images for appium too
      hub.docker.com/r/appium/appium/

    • @ashwinnetalkar2992
      @ashwinnetalkar2992 Před 4 lety +1

      Actually the requirement is to run mobile test on virtual machine windows 10 clonned on linux based CentOS.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Give a try Ashwin, seems interesting thing to try

  • @balamuruganvaithyanathan379

    Hi Mukesh, while I try to connect my container in VNC viewer I am getting "The requested address is not valid in its context. 10049" error. Do you have any idea to solve this issue?

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +2

      No Bala, I am not sure with this error. Are you able to trigger the test on docker container?
      You can also try Zalenium and here you can get video recording of test and you can directly access the containers from dashboard itself.
      czcams.com/video/PEjUCkNft7s/video.html

    • @balamurugan9199
      @balamurugan9199 Před 4 lety +1

      @@Mukeshotwani Thanks 🤝 this ll helpful for me to verify

    • @shanjaynithin2388
      @shanjaynithin2388 Před 3 lety +4

      Uses localhost:32769 instead of 0.0.0.0:32769, it is working.

    • @ajitraskar2059
      @ajitraskar2059 Před 3 lety +1

      @@shanjaynithin2388 Thanks.localhost worked for me

  • @arunx20042003
    @arunx20042003 Před 3 lety +1

    Hi mukesh sir. In each container can i launch 5 chrome browsers? Or in 1 container i can launch only 1

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi Arun, you can configure it these settings with docker file..

  • @chandananand1640
    @chandananand1640 Před 4 lety +1

    Hello.. Mukesh How can we specify the version of browsers in the containers

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Chandan, by default it gives latest version of Browsers. If you want to change versions then you can need to make changes in docker file and build the image and then use it.
      github.com/SeleniumHQ/docker-selenium

  • @naresh1p334
    @naresh1p334 Před 4 lety +1

    Hi Mukesh,as per the lecture I have installed docker on 'windows machine' and configured hub and nodes and its working fine.
    my question here is, can we create a node in mac machine and link to same hub which was configured in windows..if yes could you please explain me how we can achieve this? Please post the lecture links if you have any
    Note:We should not install a docker again on Mac machine to achieve this.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      HI Naresh, if you want to connect node in MAC then you need to have docker then only u can run docker containers. Once you have node connected to hub you can trigger through hub.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Please check this as well naresh, czcams.com/video/PEjUCkNft7s/video.html

    • @naresh1p334
      @naresh1p334 Před 4 lety +1

      @@Mukeshotwani thanks for quick response.

  • @shivamgoyal4751
    @shivamgoyal4751 Před 3 lety +1

    Can I launch chrome and Firefox both in a single container?

    • @shivamgoyal4751
      @shivamgoyal4751 Před 3 lety +1

      In my case, I need to launch Chrome and Firefox in the same class to check synchronization. So I mentioned the same URL(http:IPAddress/wb/hub) in the RemoteWebdriver field for both Chrome and Firefox, and it launched chrome in one RealVNC server and Firefox in another.
      Now I need to execute my class(without any change) 50 times in parallel, what will you suggest?

  • @ajaygawade8853
    @ajaygawade8853 Před rokem +1

    Followed the steps as given in video but not able to see the nodes
    "The Grid has no registered Nodes yet." is displayed

  • @rajendramahapatra3293
    @rajendramahapatra3293 Před 4 lety +1

    Most of the users are using windows operating system. Could you please upload one video how to install docker on windows operating system and do all these configurations?

  • @9745754904
    @9745754904 Před 4 lety

    Hi mukesh i tried this and got 2 doubts....
    1. My selenium. Test taking to. Much time to execute on the containers.. Wat can be the reason?
    2. As in the video ,selenium Tests is running in linux OS. Wat if I Need to do in mac, ununtu OS.

    • @laxmanbinawade4278
      @laxmanbinawade4278 Před 3 lety

      Hi
      Do you get any solution for much time to execute on container?
      I also face same issue

  • @KhushbooVerma2810
    @KhushbooVerma2810 Před 4 lety +1

    Hello, I am searching something where I can run .bat file which is in remote machine(to create node) directly from the local machine. Instead of going to the remote machine n initiating it manually.
    not allowed to download any other application for this, can you please help with the cmd to run.

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Hi Khushboo, what is your exact requirement. I mean you want to use docker here?
      running batch file from jenkins then you can create slave in Jenkins and provide the path of batch file.

    • @KhushbooVerma2810
      @KhushbooVerma2810 Před 4 lety +1

      @@Mukeshotwani i have not tried Jenkins yet. Will try it now.
      Actually I have VDI where i manually run cmd to create node after creating hub . And then start the automation script to run parallel execution on node machine.
      Just wanted to know if there is any cmd ao that i can create node in vdi machine instead of doing it manually. Hope i am clear now 🙈

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Hi Khusbhoo you can run cmd commands in Jenkins as well or you can run batch file from jenkins.
      Quick question- Is this mandatory for you to run test on VDI machine?
      Docker makes this task easy by creating container.

    • @KhushbooVerma2810
      @KhushbooVerma2810 Před 4 lety +1

      @@Mukeshotwani Thank you so much mukesh for your replies. It's really helpful. I will try i i can install docker in my machine(due to ODC restrictions). If that can be done VDI won't be required. Thanks a lot. 🤗

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Great.. Let me know if any help required. Good night.

  • @jyotipravadas659
    @jyotipravadas659 Před rokem

    After running this 3 command getting container id but unable to open the grid console on my browser... The grid has no registered node yet.... How to resolve this issue

    • @sdet-softwarehub
      @sdet-softwarehub Před 6 měsíci

      i guess you are using grid 4 ---refer link czcams.com/video/ryNFaorJaSM/video.html

  • @JitendraKumar-lr3vq
    @JitendraKumar-lr3vq Před 4 lety

    hi mukesh ..when i am giving docker container port on vmc viewer i am getting following error :
    the requested address is not valid in its context (10049)
    i have mailed you the screenshots ,could you plz look into it .

    • @bharatapar3937
      @bharatapar3937 Před 4 lety

      Try : localhost:32769 in vncviewer.

    • @JitendraKumar-lr3vq
      @JitendraKumar-lr3vq Před 4 lety

      @@bharatapar3937 i tried its saying connection refused by computer i am still facing same issue could not open docker container port thrugh vnc viewer

  • @vitalii3236
    @vitalii3236 Před 4 lety +1

    How to run on this UI tests? Receive an errors

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety

      Hi Vitalii, What error you are getting.. You can run Selenium test or any other test which support Selenium Grid.

  • @9745754904
    @9745754904 Před 4 lety +1

    Hi. Mukesh. How to. Run selenium. Grid. On. Docker in Mac OS,

    • @Mukeshotwani
      @Mukeshotwani  Před 4 lety +1

      Hi Jino, commands are same only thing is we need to install docker on MAC. docs.docker.com/docker-for-mac/install/

    • @9745754904
      @9745754904 Před 4 lety

      @@Mukeshotwani actually I have windows 10 desktop and I. Need to. Use selenium. Grid on Mac container.. Is it possible..?

  • @avinashyerramsetti2769
    @avinashyerramsetti2769 Před 4 lety +2

    $ docker run -d -P -link selenium-hub:hub selenium/node-chrome-debug
    C:\Program Files\Docker\Docker
    esources\bin\docker.exe: invalid reference format.
    See 'C:\Program Files\Docker\Docker
    esources\bin\docker.exe run --help'.
    @mukhesh, whats the mistake im doing

    • @raichandrarb
      @raichandrarb Před 4 lety

      I am also getting the same error... Please let us know the reason @Mukesh otwani

    • @Mohammed-yi1ku
      @Mohammed-yi1ku Před 4 lety

      @@raichandrarb @avinash
      try this command:
      $ docker run -d -P --link selenium-hub:hub selenium/node-chrome-debug

    • @rayaprasanna
      @rayaprasanna Před 3 lety

      I guess the right command is " $ docker run -d --link selenium-hub:hub selenium/node-chrome-debug" , please try this, it worked for me.

  • @andrewgiftson8949
    @andrewgiftson8949 Před 3 lety +2

    not working

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi Andrew can you provide more details on what is not working?

  • @kaidouz7756
    @kaidouz7756 Před rokem

    Hello ser, I need you help with some questions about client side + server hub + nodes, do you have an email that I can contact you? that would be really helpfull. Thanks