Selenium Framework for Beginners 39 | How to run Selenium tests on Jenkins

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 198

  • @vinaykoppula6851
    @vinaykoppula6851 Год назад

    I was confused alot by watching so many Jenkins videos, but after watching this video I've totally clarified with my doubts thanks a ton for ur great videos 😊

    • @RaghavPal
      @RaghavPal  Год назад +1

      So happy to know this helped Vinay

  • @raghavayoga
    @raghavayoga 6 лет назад +2

    Simple, super step by step raghav......

    • @RaghavPal
      @RaghavPal  6 лет назад

      Glad to know it helped.

  • @saleemshaikh3304
    @saleemshaikh3304 5 лет назад +2

    thanks raghav..explained in very constructive way..

  • @kubeeanalytics
    @kubeeanalytics Год назад

    This video is easy to understand! Thank you Mr. Raghav! 😄

  • @hemadri100
    @hemadri100 6 лет назад +4

    well explained Raghav....

  • @Wolfakim
    @Wolfakim 3 года назад +1

    Thank you so much Raghav! Everything is pretty clear, and the explanation manner is very nice! You’ve helped me a lot!

  • @shwethasatyanarayanaraj9874
    @shwethasatyanarayanaraj9874 6 лет назад +2

    Awesome...in detail explanation. Thanks Raghav!!

    • @RaghavPal
      @RaghavPal  6 лет назад

      You're welcome Shwetha

  • @aruns5896
    @aruns5896 4 года назад +1

    Hi Raghav, Thanks for your nice video.

  • @shivam1427
    @shivam1427 4 года назад +3

    When you run Selenium in Jenkins or other CI pipelines. How are you triggering the chrome driver for the tests to run against?
    When you run the Selenium test in local then it can use the chromedriver present on the machine but what about when it runs in Jenkins and other CI pipelines? More importantly when the CI tool is cloud based like Bitbucket piplelines.

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Shivam, here you can do 2 things
      1. To have all setup, lib, browsers added on the system where CI is running
      2. To create distributed model with remote systems
      You can also use containers like Docker

  • @saxkMr
    @saxkMr Год назад

    Thank you for this great series!

  • @kennethguo9707
    @kennethguo9707 4 года назад +1

    Great Video Raghav!!!!

    • @RaghavPal
      @RaghavPal  4 года назад

      Thanks a ton Kenneth

  • @abhijitpatra5909
    @abhijitpatra5909 3 года назад +3

    Thank you, this session is useful. But can you please share a video how to configure Jenkins to run selenium tests in Grids?

    • @RaghavPal
      @RaghavPal  3 года назад +2

      I will plan Abhijit

  • @mushfiquazaman9597
    @mushfiquazaman9597 3 года назад +1

    Another nice tutorial.

  • @sithianempire7445
    @sithianempire7445 5 лет назад +2

    Awesome video! But how to accomplish this on Remote Headless Linux/Centos-7 server? As I have understood bigger projects usually use remote servers with no desktop for continuous testing in Release flow.

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi Sithian, so you should be able to configure both selenium project and jenkins on linux system. For execution, we can use headless modes of the browsers. There is a session on headless browsers in the playlist.

  • @amishah9489
    @amishah9489 3 года назад +2

    Can you please help me with the Jenkin Setup with Offline mode? I have to setup on VM where there is no internet

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Ami, I will plan on this, For now can try online help
      mohitgoyal.co/2019/02/16/install-jenkins-in-offline-mode-on-centos-rhel/
      www.jenkins.io/doc/book/installing/offline/

  • @MrAzeemulhaq
    @MrAzeemulhaq 4 года назад +1

    Hi Raghav, plz share video where Jenkins- Maven is used to build Selenium cases. Thanks.

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Azeem, you can check the playlist here - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa

    • @MrAzeemulhaq
      @MrAzeemulhaq 4 года назад

      @@RaghavPal thanks

  • @bajajlh
    @bajajlh 4 года назад +2

    You are the best, man,,

    • @RaghavPal
      @RaghavPal  4 года назад

      Thanks Iksan. Humbled

  • @ankitshrivastava9061
    @ankitshrivastava9061 5 лет назад +2

    Hello raghav i am getting following error in jenkins
    Started by user ankit
    Running as SYSTEM
    Building in workspace C:\Users\Ankit.Shrivastava\NewEntUtility\NewEnterprise
    FATAL: Couldn’t find any executable in C:\jobs\apache-maven-3.6.2-bin.zip\apache-maven-3.6.2\bin
    Build step 'Invoke top-level Maven targets' marked buil

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi Ankit, pls see if this helps - stackoverflow.com/questions/45048958/jenkins-build-error-build-step-invoke-top-level-maven-targets-marked-build-as

  • @matiastartara65
    @matiastartara65 4 года назад +2

    Hello, if I want to run test on a remote jenkins, I have to run always with headless mode in chromedriver?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Matias, if the system you are running Jenkins on is headless or supports headless browsers only, then yes you will have to do that

  • @sajjad413
    @sajjad413 4 года назад +1

    Great job

    • @RaghavPal
      @RaghavPal  4 года назад

      Thanks for watching Sajad

  • @jSonTX
    @jSonTX 4 года назад +2

    Raghav for the win again! 👊🏻

    • @RaghavPal
      @RaghavPal  4 года назад

      Thanks for watching Jason

  • @gautamichawla6651
    @gautamichawla6651 4 года назад +1

    I set up jenkins and used localhost:9191 for creating jobs but after running first time.. Again when I tried to open the same link it showed me that "unable to connect"... Raghav, can u help me out here?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Gautami, Pls check on the cmd prompt where you started Jenkins, is it still running there

  • @aniketdanane
    @aniketdanane 4 года назад +1

    Hi Raghav, I am not able to use jenkins with java v.13. Should I downgrade the java version.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Aniket, Yes, can check compatibility here - jenkins.io/doc/administration/requirements/java/

  • @jesse_dickson
    @jesse_dickson 5 лет назад +2

    Wow, you are the man!!

    • @RaghavPal
      @RaghavPal  5 лет назад

      Thanks for watching Jesse

  • @adeniyi1975
    @adeniyi1975 4 года назад +2

    hi Thanks form the lecture, it is amazing. Ia m facing this issue, Kindly help
    The goal you specified requires a project to execute but there is no POM in this directory (C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\introduction_work). Please verify you invoked Maven from the correct directory. -> [Help 1]

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Olufemi, Pls check the location of your pom.xml file. I believe you are using Jenkins on the same system, In the command you use on jenkins first cd to the location of the folder containing pom.xml file and then run the command for executing tests

  • @269sanket
    @269sanket 3 года назад

    Hey Raghav- truly appreciate your hard work for putting all this together. Do you have same thing (above steps ) done in MAC?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Sanket, you can check my jenkins series, its done on mac. Can check here - automationstepbystep.com/

    • @269sanket
      @269sanket 3 года назад

      @@RaghavPal -thanks again. Somehow I did not find when you integrate with git URL, can you please share?

  • @ashwinipimple3870
    @ashwinipimple3870 4 года назад +1

    Hi Raghav, After downloading Jenkins.war file and installing through the cmd . It gives the "java is not recognized as an internal and external command",even if I have already executed java files successfully.
    Please let me know any solution for this ..

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Ashwini, looks like either Java is not present or Java's env variables not set on your system. Pls check this -
      Java on Windows - ruclips.net/video/FqpmH8MVO6A/видео.html
      Java on Mac - ruclips.net/video/NSvtis2fGlA/видео.html

    • @ashwinipimple3870
      @ashwinipimple3870 4 года назад

      @@RaghavPal it helps ..😅Thanks Raghav ..👍

  • @ashwinijadhav6759
    @ashwinijadhav6759 4 года назад +1

    Hi Raghav , How to handle different OS driver requirement like local (macos/windows ) Vs Jenkin (Linux )

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Ashwini, for Jenkins the basic need is that java should be installed on the system. After this it depends of the test/job requirement that you want to run through jenkins. I will try to create a separate session for Linux

  • @DucNguyen-xn5bd
    @DucNguyen-xn5bd 5 лет назад +2

    Hi Raghav, in this video, we run selenium test from Jenkins in local. Can we set up Jenkins in other PC and run selenium test with source code from my PC. Because my client want to run selenium test in their side, Can you help me with solution?

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      Yes we can, so here the best option will be:
      1. Put your project on github (can use gitlab or bitbucket also)
      2. In Jenkins job, get the project from git
      3. Update the commands accordingly.
      4. Now you can run your job from any system (provided it has java and any other pre-requisite needed for the project)
      You can watch the later videos in the playlist - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa

    • @DucNguyen-xn5bd
      @DucNguyen-xn5bd 5 лет назад

      @@RaghavPal hi Raghav, what command we use when we run code from git. Because The code c: cd ... Is conect to local code. We need code to conect with code in git to run

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      Hi Duc, when you have provided your github url in the git section of jenkins job, when you run your job you can goto the logs and see the location where the project is cloned from github on the system, you can use the same folder location in your commands. Another way is you can put the parent folder location in Jenkins job > General > Advanced > Custom workspace. Now all locations will be taken relative to this so you can only provide the location starting from here. For example you can see this video - ruclips.net/video/U6Ty0mtKlbU/видео.html

  • @awaishamid555
    @awaishamid555 9 месяцев назад

    Hi Raghav, Thank you for giving a brief and easy understanding of Jenkins and Selenium.
    I can run everything fine but when I run my testing case using cmd using the method you told, it says Built Success but it says "Tests run: 0, Failures: 0, Errors: 0, Skipped: 0" also when I run in Jenkins it successfully runs with the same message in logs (Tests run: 0, Failures: 0, Errors: 0, Skipped: 0) but the browser doesn't get open. Can you kindly guide me, would be very thankful.

    • @RaghavPal
      @RaghavPal  9 месяцев назад +1

      Here are some steps to guide you:
      1. Verify Test Discovery:
      Check Annotation: Ensure your test classes and methods have the correct annotations (e.g., @Test from JUnit or TestNG).
      Confirm Naming Conventions: If relying on naming conventions, verify they match your testing framework's requirements.
      Inspect Build Logs: Look for any warnings or errors related to test discovery.
      2. Inspect Test Runner Configuration:
      Review Jenkins Settings: Ensure the test runner plugin (e.g., Maven Surefire or TestNG) is configured correctly in Jenkins.
      Check Include/Exclude Patterns: Verify that the patterns for including or excluding tests are accurate.
      3. Address Browser-Specific Issues:
      Check WebDriver: Ensure the correct WebDriver version is installed and compatible with both your browser and Selenium version.
      Review Jenkins Configuration: If Jenkins runs on a remote machine, ensure the browser is installed there and accessible.
      Consider Headless Mode: If feasible, try running tests in headless mode to isolate browser-related problems.
      4. Examine Dependencies:
      Verify Inclusion: Confirm all necessary Selenium, testing framework, and other dependencies are included in the build.
      Check Version Conflicts: Rule out any conflicts between different library versions.
      5. Troubleshoot Jenkins Environment:
      Review Workspace Configuration: Ensure the workspace is set up correctly with necessary files and environment variables.
      Inspect Slave Node Setup: If using a Jenkins slave node, check its configuration and resource availability.
      Additional Tips:
      Enable Debugging: Add logging or debugging statements to your test code to trace execution and identify potential issues.
      Review Test Code Logic: Ensure your tests are written correctly and can access necessary elements.
      Isolate the Problem: Try running a single test manually to narrow down the cause.
      Run Tests Locally: If tests run successfully locally but not in Jenkins, focus on Jenkins-specific configurations.

    • @awaishamid555
      @awaishamid555 9 месяцев назад

      Thank you so much for the brief reply. Help a lot. @@RaghavPal

  • @keethamounikavarma2430
    @keethamounikavarma2430 4 года назад +1

    I was asked to put my jenkins on a place where everyone can click for a build for selenium scripts. And i was given a Jenkins URL but i.e on a server and while running I am getting "Illegal State... " Exception. I think the reason because it is trying to open a browser but as that server doesnot have broswer installed and it cannot be installed because it is not UI based server. Linux server and the Jenkins is installed on that server. When I am trying to run it through jenkins it is throwing the exception.. Could you please help me on providing a solution to this kind of problem. I have integrated my jenkins with the git and now the jenkins is not in local and its on server and the server is without GUI.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Keetha, you do not need browser to be installed on the server where Jenkins is running, You can run jenkins on a linux server and can open it in browser in your system, provided the connection is made and the ports are open. You can check on the server where jenkins is running, Take help if required from your network team

    • @amankul-yt
      @amankul-yt 4 года назад

      Try running webdriver in headless mode. Other option is using remote environments like browser stack.

  • @Manishkansara-dq5tj
    @Manishkansara-dq5tj 6 месяцев назад

    Hi Raghav, good explanation. My selenium python scripts are running fine on my local machine through Jenkins but to run through cloud Jenkins what script/code need to be share with Devops team? Your help will be highly appreciated.

    • @RaghavPal
      @RaghavPal  6 месяцев назад

      Manish
      To run your Selenium Python scripts through a cloud-based Jenkins setup, you'll need to share the following with your DevOps team:
      1. Selenium Python Scripts: The actual test scripts written in Python that you want to execute.
      2. Dependencies: A `requirements.txt` file listing all the Python packages required to run your scripts.
      3. Configuration Files: Any configuration files that your scripts depend on, such as environment variables or system properties.
      4. Driver Executables: If not using a cloud service that provides browsers, you'll need to include the driver executables (e.g., `chromedriver`, `geckodriver`) compatible with the browsers you're testing against.
      5. Jenkinsfile: A `Jenkinsfile` that defines the pipeline to set up the environment, run the tests, and report the results.
      6. Instructions: Clear instructions on how the scripts are to be executed, including any specific sequence of commands or parameters.
      Additionally, ensure that your DevOps team is aware of any necessary infrastructure requirements, such as specific versions of browsers or operating systems needed to run the tests.
      Here's a basic example of what a `Jenkinsfile` might look like for running Selenium Python scripts:
      ```groovy
      pipeline {
      agent any
      stages {
      stage('Checkout') {
      steps {
      // Get the latest code from the source control
      git 'your-repo-url.com/your-selenium-python-scripts.git'
      }
      }
      stage('Setup Python Environment') {
      steps {
      // Set up a Python virtual environment and install dependencies
      sh 'python -m venv venv'
      sh '. venv/bin/activate'
      sh 'pip install -r requirements.txt'
      }
      }
      stage('Run Tests') {
      steps {
      // Run the Selenium tests
      sh 'python -m pytest your_test_script.py'
      }
      }
      stage('Publish Results') {
      steps {
      // Publish the test results for Jenkins to display
      junit '/test-reports/*.xml'
      }
      }
      }
      }
      ```
      Make sure to customize the `Jenkinsfile` to fit your project's structure and requirements. The DevOps team may also need access to any servers or services your tests interact with, so be prepared to provide that information as well

    • @Manishkansara-dq5tj
      @Manishkansara-dq5tj 6 месяцев назад

      @@RaghavPal , Thank you so much. I was very sure you will reply my question and you did it. I really appreciate your quick response. You don't know how big help it is for me, have a Bright future and god bless you. I will work on it and will get back to you if further help needed. Thank you

  • @abhilan9369
    @abhilan9369 4 года назад +1

    Hi, my browser in not opening when i run the test case in Jenkins, is there any config or settings i have to change to see the browser?
    As of now Jenkins is running headless browser

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Abhi, this will help
      www.edureka.co/community/2609/when-executing-jenkins-tests-with-selenium-webdriver-see-gui
      groups.google.com/forum/#!topic/selenium-users/dzcflchWvMo
      stackoverflow.com/questions/9618774/jenkins-selenium-gui-tests-are-not-visible-on-windows

    • @abhilan9369
      @abhilan9369 4 года назад

      @@RaghavPal thank you

  • @Gsuresh_3
    @Gsuresh_3 7 месяцев назад

    I integrated selenium script with jenkins but automation screen is not opened, simply console values printing, can you guide me?

    • @RaghavPal
      @RaghavPal  7 месяцев назад +1

      When integrating Selenium scripts with Jenkins, if the automation screen is not opening and only console values are printing, it's likely that Jenkins is running in headless mode. This is common when Jenkins is set up as a Windows service, which by default does not allow interaction with the desktop GUI.
      Here are a few steps you can take to troubleshoot and resolve this issue:
      1. Allow Service Interaction with Desktop:
      - If Jenkins is installed as a Windows service, go to the service properties in the Windows Services manager.
      - Find the Jenkins service, right-click on it, and select 'Properties'.
      - Navigate to the 'Log On' tab and check the option 'Allow service to interact with desktop'.
      - Restart the Jenkins service after applying the changes.
      2. Use Jenkins WAR:
      - Instead of using the Windows service installation, you can run Jenkins from a WAR file.
      - Download the `jenkins.war` file from the official Jenkins website.
      - Open a command prompt with administrative privileges and run the WAR file using the command `java -jar jenkins.war`.
      - This will start Jenkins in a mode that allows browser windows to open.
      3. Configure Selenium for Headless Execution:
      - If you prefer or need to run Jenkins as a service without GUI interaction, configure your Selenium tests to run in headless mode.
      - For Chrome, you can use `ChromeOptions` to set the headless mode:
      ```java
      ChromeOptions options = new ChromeOptions();
      options.addArguments("--headless");
      WebDriver driver = new ChromeDriver(options);
      ```
      - Similar configurations are available for other browsers like Firefox with `FirefoxOptions`.
      4. Check for Display Server:
      - Ensure that a display server like Xvfb (X virtual framebuffer) is installed and configured if you're running Jenkins on a Unix-like system without a physical display.
      5. Review Jenkins Configuration:
      - Check the Jenkins configuration files for any settings that might prevent GUI interaction.
      - Look for the `useSecurity` tag in the `config.xml` file located in the `.jenkins` folder and ensure its value is set appropriately.
      By following these steps, you should be able to get the Selenium automation screen to open when running your scripts through Jenkins. If the issue persists, consider reviewing the Selenium and Jenkins logs for any error messages that could provide further insight into the problem. Remember to also verify that all drivers and dependencies are up-to-date and compatible with the browser versions you are using.

  • @ramangal
    @ramangal 2 года назад

    Thanks Raghav , How we can get this project ? . Can you pls share git url for this project.

    • @RaghavPal
      @RaghavPal  2 года назад

      github.com/Raghav-Pal/SeleniumJavaFramework1

  • @aravindhseetharaman
    @aravindhseetharaman 5 лет назад +1

    Hello Raghav,
    Could you please help me running the testng.xml in command prompt?

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi Aravindh, are you facing some specific issue. This will help - testng.org/doc/documentation-main.html#testng-xml

  • @maheshreddy72
    @maheshreddy72 3 года назад +1

    Can I use the same process ruby with selenium and Jenkins

    • @RaghavPal
      @RaghavPal  3 года назад

      Yes we can Mahesh

    • @maheshreddy72
      @maheshreddy72 3 года назад

      @@RaghavPal Thank you for your response.
      If you don't mind let me know how to add a plugin in Jenkins for ruby selenium

    • @RaghavPal
      @RaghavPal  3 года назад

      I will check on this

  • @donatesmile202
    @donatesmile202 6 лет назад +1

    Hello Raghav,
    Hope you are doing well,
    Actually i have a issue, When i click on continue as a admin Button(I am not filling any info. to create a new user)then i am not landing on a jenkins dashboard, I am getting only blank screen. And i just open the same port(localhost:9191)in the incognito window, It is showing the login page. do i need to create first a new user if yes then how can we go on user registration form back, Or could we have another way to land on jenkins page correctly.
    Thanks
    Rishu

    • @RaghavPal
      @RaghavPal  6 лет назад

      Hi Rishu, you can try creating a new user. However, this is not expected behavior. Try getting a new Jenkins and check

    • @RaghavPal
      @RaghavPal  6 лет назад +1

      Glad to know this Rishu

    • @donatesmile202
      @donatesmile202 6 лет назад +1

      @@RaghavPal :)

  • @dxmayers6775
    @dxmayers6775 2 года назад

    Oh! Thanks for your guide, could i ask you? I’m using python(pycharm) and selenium. That video had “mvn clean”function is very interesting but i not using java. Am i using that “mvn clean” function?? Python cannot using other way? So please help me!

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi, I will need to check on this

  • @mudaseer21
    @mudaseer21 2 года назад

    nice raghav

  • @daimilamorumarciel7730
    @daimilamorumarciel7730 Год назад

    Thank you so much, but in my case I have installed jdk-20 and when y run jenkins on cmd console, its shows me a message saying that jenkins is not allowed to jdk-20, only for jdk-11 and jdk-17 ...how can I solve this ? Thank you in advance

    • @RaghavPal
      @RaghavPal  Год назад +1

      Hi Damini
      The error message "Jenkins is not allowed to use JDK-20, only for JDK-11 and JDK-17" means that Jenkins is not currently compatible with JDK-20. This is because Jenkins is a Java application, and JDK-20 is a newer version of Java that is not yet fully supported by Jenkins.
      To solve this issue, you can either:
      * Downgrade to JDK-11 or JDK-17.
      * Wait until Jenkins is updated to support JDK-20.
      If you choose to downgrade to JDK-11 or JDK-17, you can do so by following these steps:
      1. Open a terminal window.
      2. Type the following command to uninstall JDK-20:
      ```
      sudo apt remove openjdk-18
      ```
      3. Type the following command to install JDK-11:
      ```
      sudo apt install openjdk-11-jdk
      ```
      4. Type the following command to install JDK-17:
      ```
      sudo apt install openjdk-17-jdk
      ```
      Once you have downgraded to JDK-11 or JDK-17, you should be able to run Jenkins without any problems.
      If you choose to wait until Jenkins is updated to support JDK-20, you can do so by following these steps:
      1. Go to the Jenkins website and check the release notes for the latest version of Jenkins.
      2. If the latest version of Jenkins supports JDK-20, you can download and install it.
      3. Once you have installed the latest version of Jenkins, you should be able to run it without any problems.
      I hope this helps!

    • @daimilamorumarciel7730
      @daimilamorumarciel7730 Год назад

      @@RaghavPal thank you very much, I will and I'll let you know.

  • @TarekFaham
    @TarekFaham 2 года назад

    Fantastic... I want to do the same but using NUnit and C#, is that possible? How?

    • @RaghavPal
      @RaghavPal  2 года назад +1

      You will just need commands to run your tests, When I create Selenium with C# will show this

    • @TarekFaham
      @TarekFaham 2 года назад

      @@RaghavPal great I'm waiting for this. I'm also using xunit.

  • @bhangra20001
    @bhangra20001 4 года назад +1

    Great video, but this is on the local machine instead the actual Jenkins server, I am having issue running the selenium scripts in Jenkins remote server.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Pete, what is the issue, You can also check some online examples

    • @bhangra20001
      @bhangra20001 4 года назад

      @@RaghavPal The issue is that the Jenkins server is in the Linux box and I am remotely connecting to it via URL and a lot of the examples I have seen show the localhost. I am able to connect to my source files and able to configure the workspace. I try the headless browser features and I tested but it still brings up the browser before I get it in the Jenkins

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Pete, I believe you may have to check the headless browser setup on the remote system and also update the script /commands to use that

  • @thiyagarajanc5299
    @thiyagarajanc5299 3 года назад

    Hi raghav i liked your videos. i have to run multiple environments using testng parameters with config.properties using switch case. is there any video in your playlist?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Thiyagarajan, you can check the testNG related videos in this series - ruclips.net/p/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa

  • @mounikasunkari6060
    @mounikasunkari6060 Год назад

    Hey raghav
    Great job explanation very well, it's clearly understandable,
    But I have an issue, after getting the location from the framework in eclipse--- till here everything happened well
    After I gave in cmd as administrator
    mvn clean test
    Error -- mvn is not recognised as an internal or external command, operable program or batch file
    Please reply soon, i stucked here😢

    • @RaghavPal
      @RaghavPal  Год назад

      Mounika
      To fix the error `mvn is not recognized as an internal or external command, operable program or batch file`, you need to make sure that Maven is installed on your computer and that the Maven installation directory is in your PATH environment variable.
      To do this, follow these steps:
      1. Download and install Maven from the official website.
      2. Open the Control Panel.
      3. Click on System and Security.
      4. Click on System.
      5. Click on Advanced system settings.
      6. Click on Environment Variables.
      7. Under System variables, find the Path variable and double-click on it.
      8. At the end of the Path variable value, add a semicolon (;) followed by the full path to the Maven installation directory. For example, if you installed Maven to the directory `C:\Program Files\Maven`, you would add `;C:\Program Files\Maven` to the Path variable value.
      9. Click OK to save your changes.
      10. Restart your computer.
      Once you have done this, you should be able to run Maven commands in a terminal. To run the `mvn clean test` command, open a terminal and navigate to the directory of your Selenium Java project. Then, run the following command:
      ```
      mvn clean test
      ```
      If you are still getting the error message, try the following:
      * Make sure that you are using the correct command to run Maven commands. The Maven command is simply `mvn`.
      * Try restarting your computer.
      * Try reinstalling Maven.
      If you are trying to run the `mvn clean test` command from Jenkins, you will need to install the Maven plugin on Jenkins. Once the Maven plugin is installed, you can create a new Jenkins job and configure it to run the `mvn clean test` command.

  • @charank7852
    @charank7852 6 лет назад +1

    Hi , these things done qa peoples or devops engineer need to set Jenkins job for qa people ?

    • @RaghavPal
      @RaghavPal  6 лет назад +2

      Hi Charan, most of the times Jenkins will be setup and you would need to add jobs. I believe if you get this knowledge of setting up jenkins, it will be very helpful, even for QAs

  • @pranavkumarsingh8961
    @pranavkumarsingh8961 3 года назад +1

    Can anybody tell me how to run it on Mac Os?
    I am not able to execute it.

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Hi Pranav, I will plan a mac session

  • @omom9814
    @omom9814 2 года назад

    Thank you Raghav!
    If my test suit has 1000 testcases. We develop new function & add 1 new test case. Could we config to let Jenkins only run 1 new test case only?

    • @RaghavPal
      @RaghavPal  2 года назад +1

      you can create a command for that, and add in jenkins job

    • @omom9814
      @omom9814 2 года назад

      Thank you

  • @neelaanand7314
    @neelaanand7314 6 лет назад +1

    How to implement selenium grid using Jenkins?

    • @RaghavPal
      @RaghavPal  6 лет назад

      I will try to do a session on this.

  • @swapnilshrishrimal4520
    @swapnilshrishrimal4520 2 года назад

    Thank you for such helpful video. What will be the approach for scenario where there are multiple selenium test cases and rather than creating jenkins job for each test case, can we create single jenkins job and invoke all the test cases one by one ?

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Yes, you can Swapnil you can either add all the commands in a single Jenkins job or you can create a testng.xml file and have a command added in Jenkins job to run the file,
      In general, jenkins will run the commands that you add, You will need to create commands as per your need

    • @swapnilshrishrimal4520
      @swapnilshrishrimal4520 2 года назад

      @@RaghavPal Thanks a lot for the inputs.

    • @swapnilshrishrimal4520
      @swapnilshrishrimal4520 2 года назад

      Hello Raghav, I have 3 classes and in each classes there are multiple test cases. The TestNG is considering those test cases as Individual test cases. What I need is, TestNG should consider one class as one test case. Is this possible by using TestNG. The Testing team has used @BeforeTest and @Test annotation in the each classes. Apologies for a very specific query.

    • @RaghavPal
      @RaghavPal  2 года назад +1

      you can create testng.xml and give the configuration there

  • @pankgupta9583
    @pankgupta9583 4 года назад

    Hi Raghav, when i configure and run through git, my test run successfully however i am not able to see the browser when running through jenkins, jenkins is configured on local host only, what could be the reason?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Pank, Check if this helps - stackoverflow.com/questions/9618774/jenkins-selenium-gui-tests-are-not-visible-on-windows

  • @tarikchaouki4048
    @tarikchaouki4048 4 года назад +1

    Thank you alot for your videos brother but I got one issue when I run my Tests on jenkins
    [WARNING] Error injecting: org.apache.maven.plugin.surefire.SurefirePlugin
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project selenium: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test failed: Unable to load the mojo 'test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4'. A required class is missing: org/apache/maven/plugin/surefire/SurefireReportParameters
    and thank you Sir

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Tarik, can try adding Maven Surefire Plugin in pom.xml. This will help
      stackoverflow.com/questions/23588957/maven-surefire-plugin-missing-in-eclipse
      cmsdk.com/java/maven-build-fails-beacuse-of-mavensurefireplugin.html

    • @tarikchaouki4048
      @tarikchaouki4048 4 года назад

      ​@@RaghavPal hi raghav thanks for reply but it still giving me
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project selenium: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test failed: Unable to load the mojo 'test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4'. A required class is missing: org/apache/maven/plugin/surefire/SurefireReportParameters

    • @tarikchaouki4048
      @tarikchaouki4048 4 года назад

      Hi raghav any solution to solve it brother and thank you .

  • @Zack-ni3vz
    @Zack-ni3vz 3 года назад

    when my build runs, it says that py.test: command not found. but i know thats installed because i have been using it. can you help me out here?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi, please point the time where is this referred to in the video

    • @Zack-ni3vz
      @Zack-ni3vz 3 года назад

      @@RaghavPal its not in your video. what i am saying is, when i run MY test, i use py.test in the command in jenkins. but when then build runs, it fails and says py.test: command not found. do you have any helpful advice?

    • @RaghavPal
      @RaghavPal  3 года назад

      Is Jenkins on the same system where you have installed Pytest. Check this stackoverflow.com/questions/41281900/pytest-integration-with-jenkins

  • @TheSoleNemesis
    @TheSoleNemesis 2 года назад

    This is the error I get.......
    localhost refused to connect.
    Try:
    Checking the connection
    Checking the proxy and the firewall
    ERR_CONNECTION_REFUSED

    • @RaghavPal
      @RaghavPal  2 года назад

      try changing port no

  • @venkateshchowdary4331
    @venkateshchowdary4331 3 года назад

    how do you set your gmail wallapaer like that

    • @RaghavPal
      @RaghavPal  3 года назад

      Its a chrome plugin Venkatesh

  • @ManinderSingh-sj3zh
    @ManinderSingh-sj3zh 3 года назад

    how can I run simple selenium java (non-maven) project on jenkins, like browser launch and all ?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Maninder, you just need to have command to run from jenkins and the system setup

    • @ManinderSingh-sj3zh
      @ManinderSingh-sj3zh 3 года назад

      @@RaghavPal okay. Also how can my client run the selenium tests I created on the system?

    • @RaghavPal
      @RaghavPal  3 года назад

      You should keep a central machine to do that, it will be difficult to do the setup on each local system

    • @ManinderSingh-sj3zh
      @ManinderSingh-sj3zh 3 года назад

      @@RaghavPal how to setup central machine? or the client do that?

    • @RaghavPal
      @RaghavPal  3 года назад +1

      It can be a system where you can setup Jenkins along with all the configuration needed to run the test, This can also be done using docker,

  • @balabhaskararaoguntupalli1275
    @balabhaskararaoguntupalli1275 6 лет назад +1

    Thanks you

  • @indukeerthi
    @indukeerthi 3 года назад

    I'm unable install Jenkins for windows 7 32 bit ?

    • @RaghavPal
      @RaghavPal  3 года назад

      What is the issue Indhu

    • @indukeerthi
      @indukeerthi 3 года назад

      @@RaghavPal I entered Java -jar jenkins.war --httpPort=9191 and it's taking more than a hour to install! Could you please let me know does it take this much time?
      Note: In Cmd it's showing as Starting installation of a batch 19 plugin Plus their dependencies

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Hi Indhu, No it should not take this much, Can try again with a new jar

    • @indukeerthi
      @indukeerthi 3 года назад

      @@RaghavPal thanks Raghav now it's working fine. One more doubt i'm unable to create maven project. Hence I try to install maven plugins perhaps it's also unable to download. Could you please let us know how to create maven project in Jenkins ?

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Hi Indhu, I will do a video for now pls see some online examples

  • @mummas_ayu
    @mummas_ayu 3 года назад

    Hello Raghav Sir,
    Thanks For Your Tutorial Videos. It helps us so much. I am new to Automation testing, So I just want to ask 1 thing that I have an web application with continues changes in it. So I have write automation script for that using selenium. How do i manage them in jenkins So if every changes i do in my application, my test script will run & Test it.

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Ajay, If you are able to handle it with Selenium scripts, then you just need to run the same from Jenkins, Jenkins just enables us to run the test from CI CD process

  • @mayankjain9941
    @mayankjain9941 4 года назад +1

    Hello Rahav need help from you while running selenium project through Jenkins I am getting below error
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
    Build step 'Execute Windows batch command' marked build as failure
    Finished: FAILURE
    Can you guide me on how I will be resolved above error.?

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Mayank, this is complaining about pom.xml. Just check if the file is available in the project and jenkins has access to that location

    • @mayankjain9941
      @mayankjain9941 4 года назад

      @@RaghavPal Yes pom.xml file is present in the project. How to check if Jenkins has access to that location?

    • @RaghavPal
      @RaghavPal  4 года назад

      Just create a jenkins job and in that jobs, build section add windows batch command/execute shell and in the command cd to the location of the project like
      cd C:/Users/.......
      and then run the command to get current dir
      chdir (for windows)
      ls (for mac, linux)

  • @seriousthing240
    @seriousthing240 6 лет назад

    Hi bro mulesoft any idea and suggestions and members online class tell me bro in real time

    • @RaghavPal
      @RaghavPal  6 лет назад

      Not much info on that. Hope others can help

  • @aruns5896
    @aruns5896 4 года назад

    I want to reset my Jenkins password how to do ?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Arun, can check this - abhijitkakade.com/2019/06/how-to-reset-jenkins-admin-users-password/
      dumbitdude.com/jenkins-reset-user-password/

    • @aruns5896
      @aruns5896 4 года назад

      Thanks Ragav , I changed the value as false in config.xml file under .jenkins.Without any password ,page is loaded.

    • @RaghavPal
      @RaghavPal  4 года назад

      Great, pls continue with other sessions and let me know if you face any issues. A good way is to go through the comments to check if someone has already posted the question.

  • @ravindrasingh8289
    @ravindrasingh8289 8 месяцев назад +1

    I was expecting that you will tell us What is jenking. first define it

    • @RaghavPal
      @RaghavPal  7 месяцев назад +1

      I will take care of it Ravindra... there is also a separate series on Jenkins here - automationstepbystep.com/

  • @shafrithsuhail5775
    @shafrithsuhail5775 4 года назад

    I want these same integration for selenium python

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Shafrith, can check selenium python videos here - automationstepbystep.com/

    • @shafrithsuhail5775
      @shafrithsuhail5775 4 года назад

      Thanks Raghav... I already checked these videos.... I'm not able to find out any videos for python-selenium with jenkin integration

    • @RaghavPal
      @RaghavPal  4 года назад +1

      I have shown this in my Udemy course automationstepbystep.com/udemy-discounts/

    • @shafrithsuhail5775
      @shafrithsuhail5775 4 года назад

      Thanks... I will check

  • @CleverCrafts2303
    @CleverCrafts2303 4 года назад +1

    Hi Raghav, do you have an email? I need your assistance in the pipeline that I'm creating in Azure DevOps.

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Jayson, replies on email get very delayed. You can send me your queries here

    • @CleverCrafts2303
      @CleverCrafts2303 4 года назад

      @@RaghavPal Alright raghav

    • @CleverCrafts2303
      @CleverCrafts2303 4 года назад

      @@RaghavPal
      We were trying to transfer our Training automation from Github/Jenkins to Azure DevOps. The problem that we face is that we were update config.properties after the setup step and we need to commit and push that afterwards. The updated config.properties file will then be used by another job / tasks for the actual tests that we run. Would you know if this is feasible?

    • @CleverCrafts2303
      @CleverCrafts2303 4 года назад

      Please let me know if you need some additional context about the project and pipeline that I am working on right now.
      TYIA!

  • @vamshivishwanath
    @vamshivishwanath 3 месяца назад +1

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project Orang1: Compilation failure: Compilation failure:
    [ERROR] /C:/Users/sss/eclipse-workspace/Orange1/src/main/java/Day01/Assertion.java:[3,25] package org.testng does not exist
    [ERROR] /C:/Users/sss/eclipse-workspace/Orange1/src/main/java/Day01/Assertion.java:[3,1] static import only from classes and interfaces
    =====
    facing above error while running in cmd for jenkins any idea on it please help

    • @RaghavPal
      @RaghavPal  3 месяца назад

      Vamshi
      Let's break down the error message step by step:
      Step 1: Identify the problem
      The error message indicates that there are two compilation errors in the `Assertion.java` file, located in the `Day01` package, in the `Orange1` project.
      Step 2: Analyze the first error
      The first error message says: `[3,25] package org.testng does not exist`. This means that the Java compiler is unable to find the `org.testng` package, which is required by the `Assertion.java` file.
      Possible Cause:
      The `org.testng` package is part of the TestNG framework, which is commonly used for testing in Java. It's likely that the project is missing a dependency on TestNG in its Maven configuration file (`pom.xml`).
      Step 3: Analyze the second error
      The second error message says: `[3,1] static import only from classes and interfaces`. This error is related to the way imports are declared in the `Assertion.java` file. Specifically, it seems that there's an attempt to statically import something that's not a class or interface.
      Possible Cause:
      This error might be related to the first error. If the `org.testng` package is not available, the static import statement might be causing this error.
      Solution:
      1. Add TestNG dependency to `pom.xml`: Make sure that the `pom.xml` file includes the following dependency:
      ```xml
      org.testng
      testng
      7.4.0
      test
      ```
      Adjust the version number according to your needs.
      2. Fix the static import statement: Review the `Assertion.java` file and ensure that the static import statement is correct. Make sure it's importing a class or interface from the `org.testng` package.
      3. Clean and rebuild the project: Run the following command in your terminal/command prompt:
      ```
      mvn clean package
      ```
      This will clean the project, rebuild it, and attempt to compile the code again.
      4. Run the Jenkins job again: After fixing the issues, try running the Jenkins job again to see if the compilation errors are resolved.
      --

    • @vamshivishwanath
      @vamshivishwanath 3 месяца назад

      ​@@RaghavPalhi raghav
      Actual commands given in jenkins-:
      cd C:\Users\sss\Downloads\mavenjenkins-master\mavenjenkins-master
      mvn clean test
      output on jenkins
      D:\Tools\JenkinsHome\workspace\Selenium firist job> cd C:\Users\sss\Downloads\mavenjenkins-master\mavenjenkins-master
      directory not changing to c drive
      shows below-:
      D:\Tools\JenkinsHome\workspace\Selenium firist job> mvn clean test
      .
      --
      i want mnv clean test on c drive please give suggestion if u face this earlier

    • @RaghavPal
      @RaghavPal  3 месяца назад

      On jenkins add commands:
      c:
      cd C:\Users\sss\Downloads\mavenjenkins-master\mavenjenkins-master
      mvn clean test

    • @vamshivishwanath
      @vamshivishwanath 3 месяца назад +1

      @@RaghavPal Thanks so much a lot
      i am learning so much from you ...........

  • @hazimabdoh6303
    @hazimabdoh6303 2 года назад

    dear MR Raghaf , realy you are so clever to introduce this material on an easy way and helfull manner, i had execute the command mvn clean test but the result goes failed for build as follow : ------------------------------------------------------------
    [ERROR] Source option 5 is no longer supported. Use 6 or later.
    [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
    [INFO] 2 errors
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 13.523 s
    [INFO] Finished at: 2022-07-07T03:07:03+03:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project seleniumjavaframework: Compilation failure: Compilation failure:
    -------------------------------
    note that my pom.xml is created and written in agood manner.
    is there are any solutions pls .thanks in advance

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Hazim,
      pls check if this helps you
      Right Click on Project.
      Click on Build path.
      Click on Configure Build path.
      It opens a Java Build path window.
      Click on Java Compiler in the Left side.
      It navigates to Java Compiler window in that to set the Compiler compliance level is set as according to your jre version(ex if java version is 1.8 then choose 1.8) as select.
      Click on [Apply] button.
      Click on [OK] button.
      Right click on Project > Maven > Update the project.
      Right click on Project > Run As > Maven install -- The pom.xml file is running and java jars are download and installed to project.
      Right click on Project > Run As > Maven Test -- The pom.xml file is running and java jars are download and installed to project.
      stackoverflow.com/questions/53034953/error-source-option-5-is-no-longer-supported-use-6-or-later-on-maven-compile

    • @hazimabdoh6303
      @hazimabdoh6303 2 года назад

      @@RaghavPal Dear SIR Raghaf , i followed and applied all the steps that are recieved from you , but the problem still present , hope i can find a solution to resolve this issue, thanks .
      note : my java version is : 11.0.13 2021-10-19 LTS

  • @TheSoleNemesis
    @TheSoleNemesis 2 года назад

    Hi Ragav, on my computer after connecting to localhost:9191 first time it gives me an error saying "localhost refused to connect" when I click on "execute batch command.." Can you tell me what's wrong here?

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Shakil, check more logs, can try using a diff port