Selenium Framework for Beginners 38 | How to run Selenium TestNG tests with Maven Command Line

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ม.ค. 2025

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

  • @kosta2177
    @kosta2177 4 ปีที่แล้ว +2

    That was exactly what I needed on my task. I had to set up two separate Jenkins jobs to run different tests from the same project repository. Thank you so much.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Glad it helped!

  • @akshaybhatia7977
    @akshaybhatia7977 3 ปีที่แล้ว +2

    I wish I should have watch this video before attending my interview today 😊
    Very important confirm I must say. Thanks for sharing.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it was helpful Akshay

  • @toxicjtv2466
    @toxicjtv2466 2 ปีที่แล้ว +1

    Thank you so much - was stuck on this problem all day and you've helped me solve it. Keep up the good work, you are an amazing teacher.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      So happy & humbled to know this

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

    Thank you for your work, Raghav! Well done!

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

      Most welcome

  • @tonyatonya4805
    @tonyatonya4805 6 ปีที่แล้ว +2

    Looks really nice your tutorial. One thing: You can also use Ubuntu for win 10 - is sort of an Os inside a OS and is really helpful . Is working perfectly. Cuz my Local laptop has some issues with git account sync , one day i thought - why not trying Ubuntu Win10. Tnx again for uploading this video and Keep going!!!!

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for the info Tonyka

  • @miketysonschwarzeneggerpra9215
    @miketysonschwarzeneggerpra9215 4 ปีที่แล้ว

    Thank very much, your channel is the better channel about automation.
    Clear explanation

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Glad to hear that Mike

  • @AC-vt1nq
    @AC-vt1nq 3 ปีที่แล้ว

    I was very impressed with clarity and simplicity of presentation. Excellent !!!!

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Thanks a lot

  • @mzamomahaeng268
    @mzamomahaeng268 4 ปีที่แล้ว +1

    You are making me look so good at work :-) Thank you for the videos again sir.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      So nice of you Mzamo

  • @revathyrao8776
    @revathyrao8776 4 ปีที่แล้ว

    Thanks much for making a such a detailed video. Very useful one. I am now referring ur videos to my friends.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Awesome Revathy, you will find all here - automationstepbystep.com/

  • @abuqadeer7833
    @abuqadeer7833 5 ปีที่แล้ว +1

    Short and very clear explanation, thx!

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      You're welcome Abu

  • @samikshyamishra5964
    @samikshyamishra5964 4 ปีที่แล้ว

    Short and crystal clear explanation.. Thank you

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Most welcome Samikshya

  • @louisaguo2744
    @louisaguo2744 5 ปีที่แล้ว

    Thank you Raghav, you are very nice and share the thing you learn free for everyone, and reply most every comment...amazing...I just wondering if you can share the way how you learn new things? since there are so much to learn and it seems impossible to remember all the things at one time, but you really did a very good job and you learned so many tools and explained so clear.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Hi Louisa, thanks a lot for your message. I got exposure to a lot of things during my career and now as a teacher I keep learning and teaching.

  • @yuvali3152
    @yuvali3152 4 ปีที่แล้ว

    Clear explanation. tnx!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Glad it was helpful Yuval

  • @dheerajsingh6568
    @dheerajsingh6568 6 ปีที่แล้ว

    Best of best Raghav ji....

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Glad it helped Dheeraj

  • @ManishKumar-vu1nc
    @ManishKumar-vu1nc 5 หลายเดือนก่อน

    While adding testng file at 10:11 is it necessary to add the same in properties tag?

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

      Manish
      In general, when you add a TestNG file (e.g., `testng.xml`) to a Selenium Java project, you don't necessarily need to update a `properties` tag with the same information.
      The `testng.xml` file is used to configure TestNG tests, including specifying test classes, methods, and suites. The file is typically used to define the test execution sequence, and TestNG will automatically pick up the tests defined in this file.
      On the other hand, a `properties` tag is usually used to configure project-specific properties, such as environment variables, database connections, or other settings that are not directly related to TestNG.
      Unless you have a specific requirement to configure a property related to the TestNG file, it's not necessary to update a `properties` tag when adding a TestNG file to your project.
      -

  • @siddarajus7166
    @siddarajus7166 2 ปีที่แล้ว

    Nice teaching sir

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Thanks and welcome

  • @Fury-qq3px
    @Fury-qq3px 4 ปีที่แล้ว

    Much detailed and informative..

  • @prasadreddy9579
    @prasadreddy9579 3 ปีที่แล้ว

    Hi Raghav - Can you please put a video to show how to bundle this project as a jar and with executable capability so that I can take this bundle and run it on other VMs. Not just only the local machine where the project is created. For same the TestNG selenium one built from Maven.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Prasad, you can check this video - th-cam.com/video/QB19Wqimkq4/w-d-xo.html, however running through jar may not be the most efficient way, you can create a maven project, add it to a cloud repo like GitHub and have commands to clone and run the project from anywhere

  • @shubhammalunjkar4552
    @shubhammalunjkar4552 2 ปีที่แล้ว

    Thank you its very helpful

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      You're welcome!

  • @PoojaGupta-oq4vv
    @PoojaGupta-oq4vv 4 ปีที่แล้ว

    How can generate a Runnable jar file for these test cases and run that jar file from command prompt.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Pooja, Although I will not suggest running through JAR but still if you need to can watch this - th-cam.com/video/QB19Wqimkq4/w-d-xo.html

  • @quadriyusuf8431
    @quadriyusuf8431 3 ปีที่แล้ว

    Thanks Raghav for your effort and contribution to the community. I have a situation at work making my tests to fail on Jenkins; something that was not happening until recently.
    How can I disable/close/skip browser alerts in command line for a Selenium test? Command line does not support it.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      I will need to see the details on why CLI does not support

    • @quadriyusuf8431
      @quadriyusuf8431 3 ปีที่แล้ว

      @@RaghavPal sorry for the late response. It looks like it's not a CLI issue but I'm yet to find a fix for the issue. Jenkins build for my Maven POM tests still fails due to timeout after 10minutes even though everything runs fine locally. Error on Jenkins is "Build Aborted. Not looking for any TestNG results"

  • @kiranshinde8205
    @kiranshinde8205 6 ปีที่แล้ว +1

    Nice explanation

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for watching Kiran

  • @deepakMCA2009knit
    @deepakMCA2009knit 5 ปีที่แล้ว +1

    Hi Raghav, Can you please help me to get a help/tutorial video to run testng.xml from command line. I gone through many links and have only idea that it is something like
    java -cp ---- - - bin;---- lib;- - - - org.testng.TestNG testng.xml
    and I tried many ways to use this but test cases not ran.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Deepak, check here - stackoverflow.com/questions/11896791/how-to-run-testng-from-command-line

  • @ShivaKumar-xx8do
    @ShivaKumar-xx8do 4 ปีที่แล้ว

    Excellent explanation, Thank you :)

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You're welcome Shiva

  • @barryismaila1723
    @barryismaila1723 5 ปีที่แล้ว +1

    Hello, I did every step but the test are not runing with maven. It works in eclipse but it says that org.junit doesn't exists. Help please

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Hi Barry, just check your pom.xml. Does it have dependency for junit? If not add and if already present check the
      junit
      junit
      4.12
      test
      If the scope is test, it will work for classes/scripts present only in test folder i.e. src/test/java. May be your file/class you are running is in src/main/java. Pls check. You can remove scope node.

    • @barryismaila1723
      @barryismaila1723 5 ปีที่แล้ว

      @@RaghavPal thank u for the answer. I'm using junit5 and yes my class test is in src/test/java

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Okay, try checking with junit 4 stable ver.

  • @scaratlas3347
    @scaratlas3347 2 ปีที่แล้ว

    I have a complation error where it says No compiler is provided in this environment. Perhaps you are running on a JRE rather a JDK?
    The problem is I have a JDK installed. I tried solutions from stackexchnage but they didn't work

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      what output do you get when your run command
      javac -version

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

    Thank you so much Sir

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

      Most welcome

  • @mahikarnati3630
    @mahikarnati3630 3 ปีที่แล้ว

    I'm getting compilation failure on command prompt ,when I enter mvn clean test.
    Can you please resolve it?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Mahi, what is the error, pls check the logs and setup

  • @aswathym.r8667
    @aswathym.r8667 3 ปีที่แล้ว

    Hi Raghav
    Videos are crisp and clear 👏.
    An interview question: what is the maven command to execute multiple tests ( For example: 100 tests) at a time

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Aswathy, actually you can use mvn test and it will run all the tests or files in src/test/java folder

  • @bhaskartimothy3146
    @bhaskartimothy3146 3 ปีที่แล้ว

    Thank you sir.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome Bhaskar

  • @hazimabdoh6303
    @hazimabdoh6303 2 ปีที่แล้ว

    Thank you so much , i have one question pls , when i execute the command : mvn clean test from my project location nothing happend the curser return back to the command line without showing any error or result , note that before executing the command , i copied the mvn from C:\Program Files\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin to my project loation, please i am waiting your reply .special thanks.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Hi Hazim, hope you are running the command from project folder, Can try on a new cmd

    • @hazimabdoh6303
      @hazimabdoh6303 2 ปีที่แล้ว

      @@RaghavPal
      dear sir , now its working fine after i provide the full path of mvn location in the environment variable : C:\Program Files\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin ,
      but after executing the command it shows me thats the BUILD FAILURE :
      -------------------------------------------------------------
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [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: 01:14 min
      [INFO] Finished at: 2022-07-07T01:57:45+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:
      [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.
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [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/MojoFailureException
      are there any solution ?
      note : when executing the command : mvn clean , it shows me BUILD success.
      thanks in advance

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      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

  • @jegarapiag6965
    @jegarapiag6965 3 ปีที่แล้ว

    Hello Raghav, how do you run a TestNg Selenium project using the methods you listed here. I want at least to see that a Selenium project with ChromeDriver is executing..please advise. Thank you.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Jegar, this is a complete series, and it should be convered in some videos, Pls check - automationstepbystep.com/

  • @Emfar
    @Emfar 2 ปีที่แล้ว

    In a gradle selenium project how to run test from testng?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      I have not done session with gradle, but you can find testng related videos in this playlist

  • @siddarajus7166
    @siddarajus7166 2 ปีที่แล้ว

    Sir could you make a video on maven cmd parameters

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      I will do, can find some existing videos here automationstepbystep.com/

  • @DucNguyen-xn5bd
    @DucNguyen-xn5bd 5 ปีที่แล้ว +1

    Hi Raghav, can I run selenium by command line but without TestNG. example, I just write very basic class with open google page, no TestNG framework inside.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      You can, like you run any java class from command line. Can check this - th-cam.com/video/O_G_66NQpTY/w-d-xo.html

  • @ankitathakur1930
    @ankitathakur1930 4 ปีที่แล้ว

    Hi Raghav.....when I am giving mvn clean install command..... it says mvn is not recognised as an internal or external command.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      That means maven is not setup on your system. Check
      how to install maven under Maven section here automationstepbystep.com/

    • @ankitathakur1930
      @ankitathakur1930 4 ปีที่แล้ว

      @@RaghavPal Thank u so much

  • @tantaatoyvlogs2425
    @tantaatoyvlogs2425 4 ปีที่แล้ว

    when run the tests through maven command line the emailable-report.html is not updating

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Chandra, it can be due to location issue, Pls check this - stackoverflow.com/questions/44176482/testng-emailable-report-is-not-updating

  • @mudaseer21
    @mudaseer21 3 ปีที่แล้ว

    thanks i am able to run from cmd line

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome Mudaseer

  • @aneeshnair467
    @aneeshnair467 4 ปีที่แล้ว

    Hi Raghav, Thank you so much for the videos you create.
    I have a quick question, How do you stop the execution triggered through mvn test?
    I tried Ctrl+C to stop, I see the maven gets stopped in command prompt but the execution still continues in the browser? How can I kill the whole execution?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Aneesh, ideally if you stop the process from cmd it should stop. May be it has buffered some steps

  • @HimanshuKumar-rf8kj
    @HimanshuKumar-rf8kj 3 ปีที่แล้ว

    How did you autocomplete the XML file while editing , if you can tell that would be a great help :)

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Himanshu, I can check if you provide the exact time, but in general if you are using any tool or platform with support for xml , you can do autocomplete using TAB

    • @HimanshuKumar-rf8kj
      @HimanshuKumar-rf8kj 3 ปีที่แล้ว

      @@RaghavPal Hi sir thanks for the reply , the time for the vidoe is "th-cam.com/video/lQCyVy-g1e8/w-d-xo.html" . I have tried using TAB for autocomplete the XML but it did not work for me in the Eclipse, Is there any plugin that i need to donwload for it ?Also can you please suggest any plugin in eclipse via which i can read the JAR files ( to check its methods/classes)??

  • @shubhambhoskar6014
    @shubhambhoskar6014 4 ปีที่แล้ว

    I have various test cases and used to run smoothly using tesng.xml
    But after implementing this as shown in the video the cmd shows complier error
    And also my smooth running testng.xml is showing error as “Cannot find class in classpath : testfilename “
    Please help me out here

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Shubham, pls check this stackoverflow.com/questions/7600898/testng-error-cannot-find-class-in-classpath

  • @PRINCERAJ-yf6ey
    @PRINCERAJ-yf6ey 2 ปีที่แล้ว

    hi Raghav
    i was using maven sure-fire with system properties so i used ${url} in pom while running from CMD how i will provide the url like for suite file we give -Dsuite=suitefileName.xml

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Prince, what issue you get when you pass url, show me the setup and logs

  • @ngavu2066
    @ngavu2066 2 ปีที่แล้ว

    Thank you so much for clearly explanation.
    But i was BUILD ERROR after run mvn clean test
    due to 2 errors: Source option 5 is no longer supported. Use 7 or later / Target option 5 is no longer supported. Use 7 or later.
    Please help me

    • @PRINCERAJ-yf6ey
      @PRINCERAJ-yf6ey 2 ปีที่แล้ว

      you can paste here the complete error logs here so that can find the issue

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      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

  • @sumanthbs2555
    @sumanthbs2555 4 ปีที่แล้ว

    Sir, How to re-run failed test cases by maven command?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You can use testng features for this and run the command with mvn

  • @nehashukla3685
    @nehashukla3685 4 ปีที่แล้ว

    Hi Raghav,When i am try to run Selenium TestNg test with Maven command line i am getting this errror:
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ learnmaven ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Neha\Selenium\SeleniumJavaProject\learnmaven\src\main
    esources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ learnmaven ---
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 3 source files to C:\Project\Selenium\SeleniumJavaProject\learnmaven\target\classes
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.803 s
    [INFO] Finished at: 2020-04-03T16:19:52-04:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project learnmaven: Compilation failure -> [Help 1]

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Neha, you can try to add the following in the properties section of pom.xml
      1.8
      1.8
      Version can be updated as per your java ver
      stackoverflow.com/questions/42525139/maven-build-compilation-error-failed-to-execute-goal-org-apache-maven-plugins

  • @venkateshbathina3220
    @venkateshbathina3220 4 ปีที่แล้ว

    Hi Raghav , if I am running testng.xml from maven ,test-output folder is not creating in project .
    Can you please help me here

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Venkatesh, what is the error, pls check all the steps again

    • @venkateshbathina3220
      @venkateshbathina3220 4 ปีที่แล้ว

      @@RaghavPal There is no error in command prompt ,but test-output is not getting created in eclipse folder structure (i tried refreshing the folder)

  • @ankitshrivastava1772
    @ankitshrivastava1772 ปีที่แล้ว

    Hello Raghav, when i run as maven then it shows build success but my selenium script doesn't execute, what can be the cause? Using ubuntu machine.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Ankit,
      I will need more details and logs to check the root cause, Here are some possible reasons:
      Incorrect dependencies: Make sure you have included all the required dependencies for Selenium and WebDriver in your project's pom.xml file.
      Incorrect script location: Make sure your Selenium script is located in the correct directory in your project and is being picked up by Maven during the build.
      Incorrect test configuration: If you are using TestNG or JUnit, make sure that your test configuration is correct and your test class is being executed by Maven during the build.
      WebDriver initialization issues: Make sure that the WebDriver is being initialized correctly in your script and that it is able to connect to the correct browser.
      Browser compatibility issues: Make sure that the browser version you are using is compatible with the version of WebDriver you have installed.
      Incorrect element locators: Make sure that the locators you are using in your script are correct and that they can locate the elements in the page.

  • @sudeepsharma6917
    @sudeepsharma6917 4 ปีที่แล้ว

    Hi Raghav,
    I have tried to run from command line but it is giving build failure error every time-
    :\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework>mvn clean test
    [INFO] Scanning for projects...
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for Seleniumjavaframework:Seleniumjavaframework:jar:0.0.1-SNAPSHOT
    [WARNING] 'dependencies.dependency.version' for com.applitools:eyes-selenium-java3:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 46, column 14
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO]
    [INFO] ------------< Seleniumjavaframework:Seleniumjavaframework >-------------
    [INFO] Building Seleniumjavaframework 0.0.1-SNAPSHOT
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Seleniumjavaframework ---
    [INFO] Deleting C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Seleniumjavaframework ---
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Seleniumjavaframework ---
    [INFO] Changes detected - recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 2 source files to C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target\classes
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Seleniumjavaframework ---
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Seleniumjavaframework ---
    [INFO] Changes detected - recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 25 source files to C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target\test-classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Test/Extendsreportbasicdemo.java:[37,15] ';' expected
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,23] expected
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,22] not a statement
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[11,2] reached end of file while parsing
    [INFO] 4 errors
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.448 s
    [INFO] Finished at: 2021-01-10T22:28:11-05:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project Seleniumjavaframework: Compilation failure: Compilation failure:
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Test/Extendsreportbasicdemo.java:[37,15] ';' expected
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,23] expected
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,22] not a statement
    [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[11,2] reached end of file while parsing
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [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/MojoFailureException
    Can u please help me what is the issue here, so that i can fix that?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Sudeep, loos like some syntax issue in Excelutilitiesdemo.java Pls check

  • @shalinirakesh3455
    @shalinirakesh3455 4 ปีที่แล้ว

    Good Explanation.
    I want to execute my selenium tests from command line in a linux machine.How can i do that?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Shalini, you will have to have your project there and then you can use the same commands. You will need headless browsers. I will plan for a session, Meanwhile pls take online help

    • @shalinirakesh3455
      @shalinirakesh3455 4 ปีที่แล้ว

      @@RaghavPal Thanks a lot. I will try that

    • @shalinirakesh3455
      @shalinirakesh3455 4 ปีที่แล้ว

      Hi Raghav,
      How do i send the build number as parameter while running tests from command line?Also i want to use the build number entered in command line as a reference for my test cases. Like if i create a account in google it should have the build number in the account name so that anyone can understand the record was created by automation for a particular build.
      Is it possible?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Shalini, are you can do with testng parameters - stackoverflow.com/questions/37696990/how-to-pass-parameter-to-testng-in-command-line

    • @shalinirakesh3455
      @shalinirakesh3455 4 ปีที่แล้ว

      Thank you Raghav. I will try and let you know

  • @chandrasekharnasaka4973
    @chandrasekharnasaka4973 4 ปีที่แล้ว

    When I run a testng.xml with 4 classes in it..the methods in those classes are not running..only login/ logout is happening.when run 1 class through XML file the test in those are running.what would be the error

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Chandra, I will need to see the setup

  • @sym-john7795
    @sym-john7795 4 ปีที่แล้ว

    How do I add OpenCV in an executable jar with maven? Would you please make a tutorial on this or any suggestion could help. BTW you are doing great brother.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi, I will check and if possible will create a session

  • @UdayKiran-tc9ku
    @UdayKiran-tc9ku 6 ปีที่แล้ว

    awesome raghav

  • @NEHAGUPTA-qw9hp
    @NEHAGUPTA-qw9hp 4 ปีที่แล้ว

    Hi Raghav
    I am running the sikuli code for file upload to a site but I get the error maven surefire plugin failed to 2.19.1 : fork VM terminated without saying goodbye.
    Command was cmd /X /C sort of error
    I tried using surfirr plugin 2.19.1 ,2.22.0 and 2.18.1 but same error ..Can u help

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Neha, although you have not given the complete details and cause, pls check This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes

  • @shilupg
    @shilupg 5 ปีที่แล้ว

    Hi Raghav, whether we can use cucumber along with TestNG, if yes how we can run the test suite from command line

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Yes we can Shilu. I will create a video on that

    • @shilupg
      @shilupg 5 ปีที่แล้ว

      @@RaghavPal thanks . Because I got a confusion, if cucumber is there the test will be driven based on the feature file, and results also generate based on that, so my confusion is ,what the significance of adding TestNg also, if you can clarify that it will be great

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Okay for now you can refer these links
      www.lambdatest.com/blog/automation-testing-with-selenium-cucumber-testng/

  • @anubhagupta1871
    @anubhagupta1871 5 ปีที่แล้ว

    Hi I am getting compilation error after running mvn clean test but mvn clean works fine

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Anubha, will need to see the error details/logs to troubleshoot. Just check what's the reason you get on failure

  • @dnya4512
    @dnya4512 4 ปีที่แล้ว

    Thank you Raghav ..!! This was really helpful. After executing from command line I am running a test manually which basically email me emailable-report created in surefire folder. But the problem is it is mailing the earlier executed report and not the latest one. So I am first executing all test from Maven and then run that email-sending test from testng command. This solves the problem. However could you please guide me if there could be better way to achieve this ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi, I will have to see the setup, you can put a code to get the latest file from a folder.

  • @prakratiagarwal8237
    @prakratiagarwal8237 4 ปีที่แล้ว

    I have a requirement where I want to run my tests using only .exe or a batch file without having the source code as client needs to run it .Is it possible to do ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Prakrati, you can compress it in a jar, but not sure if that will be efficient, We always have the option of storing the project on cloud repo like github and on any system get it from there and run.

  • @ramanwalia007
    @ramanwalia007 4 ปีที่แล้ว

    Hi Raghav, I am Harmeet..I want to ask you , can we add more than one testng.xml files under the tag suitexmlfile..then all my testng.xml file can run one after another. Thanks

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You can, also check if it goes into a loop

  • @gayatritankar7856
    @gayatritankar7856 9 หลายเดือนก่อน +1

    Hello Sir, How do I Set Global Parameters using Maven commands and Update tests at run time? Do you have any video regarding this, I am getting errors repeatedly.
    D:\Eclipse Workspace_Selenium_Udemy\SeleniumFramework>mvn test -PPurchase -Dbrowser=edge
    #Raghavpal

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

      Gayatri
      Setting global parameters and updating tests at runtime in Selenium Java using Maven can be done by configuring your `pom.xml` file and using Maven profiles and properties. Here's a step-by-step guide to help you:
      1. Define Maven Profiles:
      - In your `pom.xml`, define profiles for different test configurations. Each profile can specify different properties.
      ```xml

      Purchase
      edge


      ```
      2. Use Properties in Tests:
      - In your Java test code, you can access these properties using System.getProperty().
      ```java
      String browser = System.getProperty("browser");
      // Use the 'browser' variable to set up your WebDriver accordingly
      ```
      3. Run Tests with Maven Command:
      - Use the Maven command to run tests with the specified profile and properties.
      ```shell
      mvn test -PProfileName -Dproperty=value
      ```
      - For example, to run tests with the "Purchase" profile and set the browser to Edge, you would use:
      ```shell
      mvn test -PPurchase -Dbrowser=edge
      ```
      4. Update Tests at Runtime:
      - To update tests at runtime, you can pass additional parameters via the command line or modify the properties in the profile before running the tests.
      5. Troubleshooting Errors:
      - If you're getting errors, make sure that the profile and property names used in the Maven command match those defined in your `pom.xml`.
      - Ensure that your test code correctly handles the properties passed from Maven.
      - Check the Maven output for error messages that can provide clues about the issue.
      for tutorials, you can search for tutorials on platforms like TH-cam using keywords like "Selenium Java Maven tutorial" to find comprehensive guides and walkthroughs.
      Remember to always keep your `pom.xml` and test code synchronized with the parameters you intend to use. This will help you avoid errors and ensure that your tests run as expected with the desired configurations
      ..

  • @usmankarim5236
    @usmankarim5236 5 ปีที่แล้ว

    Hi Raghav i am trying to add only one class through include TAG but it still running my whole xml can you help me to solve this problem?

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Hi Usman, will have to see your setup

    • @usmankarim5236
      @usmankarim5236 5 ปีที่แล้ว

      @@RaghavPal how i can show you??

    • @usmankarim5236
      @usmankarim5236 5 ปีที่แล้ว

      @@RaghavPal is there any way i can contact you?

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Usman you can email me raghav.qna@gmail.com

  • @shivam1427
    @shivam1427 4 ปีที่แล้ว

    Great tutorial as always. However I have 2 questions:
    1. Is it possible to have a framework where in your selenium test framework (TestNg + Maven) and run in a docker container and then have the nodes spinup in another docker container. I think this can be achieved using docker compose. But I am not able to figure the exact solution for this.
    2. How to run testNG xmls files or the jars from terminal using the java -cp command. I always get the below error for both:
    ```
    java testng.xml
    java Demo-test.jar
    ```
    Error: Could not find or load main class target.Demo-test.jar
    Caused by: java.lang.ClassNotFoundException: target.Demo-test.jar

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Shivam,
      1. Yes you can run using Docker containers. I have not yet created videos on this and for now you can take some online help
      2. If you are using testng, then your classes may not be having main method. In that case you can run testng.xml files from command line. You will find tutorials on that later in this series

  • @kiranshinde8205
    @kiranshinde8205 6 ปีที่แล้ว

    Sir how to create batch file for xml..I have created..but when I run this file execution start in cmd but exit after completing run..how to pause to cmd

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Kiran, pls explain in detail and the steps you have tried

  • @karventhanrangasamy6126
    @karventhanrangasamy6126 5 ปีที่แล้ว

    Hi Gaurav, excellent one. thanks a lot. I am getting "The POM for org.apache.maven.plugins:maven-surefire-plugin:jar:3.0.0-M4 is missing, no dependency information available" error all time. I tried changing the version also. But the same error with the mentioned version number. Kindly do me the needful.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Karventhan, try to add the library from here maven.apache.org/surefire/maven-surefire-plugin/dependencies.html

  • @Cainprime
    @Cainprime 5 ปีที่แล้ว

    Thank you very much for the tutorial Raghav!
    I went through this and ran into an odd error and i'm not sure eactly is wrong.
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SeleniumFramework: Compilation failure: Compilation failure:
    [ERROR] Source option 5 is no longer supported. Use 7 or later.
    [ERROR] Target option 5 is no longer supported. Use 7 or later.
    Can you or anyone help me figure this one out?

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Michael, what is your java version. You can goto cmd and run command
      java -version
      You may be using JDK9 or later
      Your project uses maven-compiler-plugin with an old version which defaults to Java 5.
      You can also try to add following in pom.xml in the project tag
      1.7
      1.7
      References
      github.com/jflex-de/jflex/issues/400
      stackoverflow.com/questions/49028810/error-source-option-1-5-is-no-longer-supported-use-1-6-or-later

    • @Cainprime
      @Cainprime 5 ปีที่แล้ว +1

      @@RaghavPal Thank you! This works fine now after adding the target version!

  • @pborse386
    @pborse386 4 ปีที่แล้ว

    Hi Raghav, I want to pass the as value Parameters from properties file using command line, like username and password, could you please give me the some solution for this

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Popat, this can help you - stackoverflow.com/questions/13245411/how-to-pass-java-code-a-parameter-from-maven-for-testing

  • @yuvraj4870
    @yuvraj4870 5 ปีที่แล้ว

    how do we do all this without using IDE at all.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Yuvraj, do you mean creating framework and all w/o IDE, It will be difficult.

    • @yuvraj4870
      @yuvraj4870 5 ปีที่แล้ว

      @@RaghavPal Yes all the process you demonstrated but using command prompt only.

  • @harinat
    @harinat 6 ปีที่แล้ว

    Thank you Raghav. It helped. I want to run my test on different machine without installing Eclipse. How can i copy these test dlls and run test. I am a .net guy not Java. Can you help. I just need to run the tests using command line and i dont want to expose my test code.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      In java, we can create jar files. I have not yet covered .net, dll etc. Will try to cover these soon

    • @thellamaswinkumar50
      @thellamaswinkumar50 4 ปีที่แล้ว

      @@RaghavPal hi how can we run pom.xml from a jar fule

  • @asifuzzamanbappy1297
    @asifuzzamanbappy1297 5 ปีที่แล้ว

    Hello Again, Is There Any Better Alternative Than Downgrading Java JDK To (JDK1.8) From (JDK 12.0.1) To Compile Maven Tests From Command Line??
    Command : mvn clean Works Just Fine, But For Running Tests It Throws
    [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.
    Any Comments Are Appreciated...

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Asif, I will have to check on this. Meanwhile see if this helps you - stackoverflow.com/questions/52232681/compile-and-execute-a-jdk-preview-feature-with-maven

  • @ankitshrivastava1772
    @ankitshrivastava1772 4 ปีที่แล้ว

    Hi, Raghav i am facing "MAVEN/MojoFailureException" .

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Ankit, Can you try to run cmd as administrator and try the command again

  • @sanjanasr1404
    @sanjanasr1404 4 ปีที่แล้ว

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project cu-auto-test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: testSuiteXmlFiles0 has null value -> [Help 1]
    i am getting this error, can anyone help me ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Sanjana, This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes

  • @rajeshdevan6051
    @rajeshdevan6051 6 ปีที่แล้ว

    Hi Raghav, could you please explain little bit slowly?

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Okay Rajesh, in case you are also doing hands-on along with the video, you can pause and resume

    • @rajeshdevan6051
      @rajeshdevan6051 6 ปีที่แล้ว

      @@RaghavPal ya tried like you said but its taking more time to understand that's y its k raghav if you can do otherwise I manage that and thank you

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Sure, I will take care. Just that few people want it to be fast, as the option to pause is always there, But i will go step by step

  • @A.B.00007
    @A.B.00007 5 ปีที่แล้ว

    "mvn clean" runs fine but "mvn clean test - with function attribute or without" shows Build Error!!!!!

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      hi Asif, will have to check the setup and logs

    • @A.B.00007
      @A.B.00007 5 ปีที่แล้ว

      ​@@RaghavPal Thanks again for your prompt response Raghab (I hope I spelled it right! :)) matter of the fact is when I check mvn -version it shows my JAVA RUNTIME ENVIRONMENT C:\Program Files\Java\jre1.8.0_201 not the JDK / JRE. I think that's what the problem is, what if I change the runtime environment from JAVA control panel directly? would that be alright? What do I do to bring this change!!

    • @A.B.00007
      @A.B.00007 5 ปีที่แล้ว

      Compilation failure
      [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
      that message is shown from running running the command mvn clean test
      which tells you that I need that change of bringing in JDK / JRE to the environment. How do I do that??

    • @A.B.00007
      @A.B.00007 5 ปีที่แล้ว +1

      I fixed it just had to add a dependency in pom.xml build section. Thanks bro.

    • @smithap3879
      @smithap3879 5 ปีที่แล้ว

      @@A.B.00007 what dependency did you add? I have a similar issue. when i run from testng.xml, it worked fine.but after running from cmd, i had compilation eroors

  • @suchetavyavahare1743
    @suchetavyavahare1743 3 ปีที่แล้ว

    Hi Raghav please check the below errors. I have tried to fix it but was unable to resolve it. Please reply to me asap[ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [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: 1.788 s
    [INFO] Finished at: 2021-11-26T14:15:22+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project FinalDemo: Compilation failure: Compilation failure:
    [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.
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [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/MojoFailureException

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      add this in pom.xml file
      1.8
      1.8
      Can update the ver as per the java ver on your system

  • @rajeshdevan6051
    @rajeshdevan6051 6 ปีที่แล้ว +1

    Please Say slowly Sir you are explaining very fast

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Sure Rajesh, I will take care in future videos

    • @Faz540
      @Faz540 6 ปีที่แล้ว +1

      You can slow down the play speed youtube videos so it's easier to follow. :)

  • @sachnkn.official
    @sachnkn.official 2 ปีที่แล้ว

    Hi sir, when i execute "mvn clean test", im getting some error, im not able to find the solution, can u please help me.
    this is the error..
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [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: 1.415 s
    [INFO] Finished at: 2022-11-30T11:59:00+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project QAfox_framework: Compilation failure: Compilation failure:
    [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.
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [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/MojoFailureException
    D:\Work\Git\Eclipse_Workspace\Automation_framework>

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      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

  • @allenromyn6323
    @allenromyn6323 ปีที่แล้ว

    Getting the following C:\Users\**********\eclipse-workspace\automationsmartentry-bitbucket\auotmationsmartentry\testng.xml is not a valid file

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Allen,
      The error message suggests that the testng.xml file specified in the given file path is not a valid file. This could be due to various reasons such as incorrect file name, file path, or file format. To resolve the issue, you can try the following:
      Verify that the file path is correct and the file exists at the specified location.
      Ensure that the file name is spelled correctly and has the correct file extension (.xml).
      Check the file format to ensure it follows the TestNG XML format.
      Try running the TestNG tests with a different testng.xml file or create a new one from scratch.
      Make sure you have necessary read/write permissions to the file.