I wish I should have watch this video before attending my interview today 😊 Very important confirm I must say. Thanks for sharing.
@RaghavPal3 жыл бұрын
Glad it was helpful Akshay
@svetlanamazhaykina69184 ай бұрын
Thank you for your work, Raghav! Well done!
@RaghavPal4 ай бұрын
Most welcome
@kosta21774 жыл бұрын
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.
@RaghavPal4 жыл бұрын
Glad it helped!
@toxicjtv24662 жыл бұрын
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.
@RaghavPal2 жыл бұрын
So happy & humbled to know this
@miketysonschwarzeneggerpra92154 жыл бұрын
Thank very much, your channel is the better channel about automation. Clear explanation
@RaghavPal4 жыл бұрын
Glad to hear that Mike
@AC-vt1nq3 жыл бұрын
I was very impressed with clarity and simplicity of presentation. Excellent !!!!
@RaghavPal3 жыл бұрын
Thanks a lot
@mzamomahaeng2683 жыл бұрын
You are making me look so good at work :-) Thank you for the videos again sir.
@RaghavPal3 жыл бұрын
So nice of you Mzamo
@tonyatonya48056 жыл бұрын
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!!!!
@RaghavPal6 жыл бұрын
Thanks for the info Tonyka
@abuqadeer78335 жыл бұрын
Short and very clear explanation, thx!
@RaghavPal5 жыл бұрын
You're welcome Abu
@revathyrao87764 жыл бұрын
Thanks much for making a such a detailed video. Very useful one. I am now referring ur videos to my friends.
@RaghavPal4 жыл бұрын
Awesome Revathy, you will find all here - automationstepbystep.com/
@shubhammalunjkar4552 Жыл бұрын
Thank you its very helpful
@RaghavPal Жыл бұрын
You're welcome!
@samikshyamishra59644 жыл бұрын
Short and crystal clear explanation.. Thank you
@RaghavPal4 жыл бұрын
Most welcome Samikshya
@siddarajus71662 жыл бұрын
Nice teaching sir
@RaghavPal2 жыл бұрын
Thanks and welcome
@gopichandan98095 ай бұрын
Thank you so much Sir
@RaghavPal5 ай бұрын
Most welcome
@louisaguo27445 жыл бұрын
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.
@RaghavPal5 жыл бұрын
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.
@bhaskartimothy31463 жыл бұрын
Thank you sir.
@RaghavPal3 жыл бұрын
Most welcome Bhaskar
@Fury-qq3px4 жыл бұрын
Much detailed and informative..
@RaghavPal4 жыл бұрын
Thanks Sai
@kiranshinde82055 жыл бұрын
Nice explanation
@RaghavPal5 жыл бұрын
Thanks for watching Kiran
@aswathym.r86673 жыл бұрын
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
@RaghavPal3 жыл бұрын
Hi Aswathy, actually you can use mvn test and it will run all the tests or files in src/test/java folder
@yuvali31523 жыл бұрын
Clear explanation. tnx!
@RaghavPal3 жыл бұрын
Glad it was helpful Yuval
@dheerajsingh65686 жыл бұрын
Best of best Raghav ji....
@RaghavPal6 жыл бұрын
Glad it helped Dheeraj
@ShivaKumar-xx8do4 жыл бұрын
Excellent explanation, Thank you :)
@RaghavPal4 жыл бұрын
You're welcome Shiva
@mudaseer213 жыл бұрын
thanks i am able to run from cmd line
@RaghavPal3 жыл бұрын
Most welcome Mudaseer
@prasadreddy95792 жыл бұрын
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.
@RaghavPal2 жыл бұрын
Hi Prasad, you can check this video - kzbin.info/www/bejne/h3OUaoqnntKep5Y, 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
@sym-john77954 жыл бұрын
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.
@RaghavPal4 жыл бұрын
Hi, I will check and if possible will create a session
@siddarajus71662 жыл бұрын
Sir could you make a video on maven cmd parameters
@RaghavPal2 жыл бұрын
I will do, can find some existing videos here automationstepbystep.com/
@UdayKiran-tc9ku5 жыл бұрын
awesome raghav
@RaghavPal5 жыл бұрын
Thanks Uday
@DucNguyen-xn5bd5 жыл бұрын
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.
@RaghavPal5 жыл бұрын
You can, like you run any java class from command line. Can check this - kzbin.info/www/bejne/hZCqkGlsg7ajirs
@quadriyusuf84312 жыл бұрын
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.
@RaghavPal2 жыл бұрын
I will need to see the details on why CLI does not support
@quadriyusuf84312 жыл бұрын
@@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"
@deepakMCA2009knit4 жыл бұрын
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.
@RaghavPal4 жыл бұрын
Hi Deepak, check here - stackoverflow.com/questions/11896791/how-to-run-testng-from-command-line
@dnya45124 жыл бұрын
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 ?
@RaghavPal4 жыл бұрын
Hi, I will have to see the setup, you can put a code to get the latest file from a folder.
@jegarapiag69652 жыл бұрын
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.
@RaghavPal2 жыл бұрын
Hi Jegar, this is a complete series, and it should be convered in some videos, Pls check - automationstepbystep.com/
@gayatritankar78565 ай бұрын
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
@RaghavPal5 ай бұрын
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 KZbin 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 ..
@scaratlas33472 жыл бұрын
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
@RaghavPal2 жыл бұрын
what output do you get when your run command javac -version
@PoojaGupta-oq4vv4 жыл бұрын
How can generate a Runnable jar file for these test cases and run that jar file from command prompt.
@RaghavPal4 жыл бұрын
Hi Pooja, Although I will not suggest running through JAR but still if you need to can watch this - kzbin.info/www/bejne/h3OUaoqnntKep5Y
@ManishKumar-vu1nc2 ай бұрын
While adding testng file at <a href="#" class="seekto" data-time="611">10:11</a> is it necessary to add the same in properties tag?
@RaghavPal2 ай бұрын
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. -
@mahikarnati36303 жыл бұрын
I'm getting compilation failure on command prompt ,when I enter mvn clean test. Can you please resolve it?
@RaghavPal3 жыл бұрын
Hi Mahi, what is the error, pls check the logs and setup
@ngavu20662 жыл бұрын
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-yf6ey2 жыл бұрын
you can paste here the complete error logs here so that can find the issue
@RaghavPal2 жыл бұрын
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
@shubhambhoskar60143 жыл бұрын
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
@RaghavPal3 жыл бұрын
Hi Shubham, pls check this stackoverflow.com/questions/7600898/testng-error-cannot-find-class-in-classpath
@aneeshnair4673 жыл бұрын
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?
@RaghavPal3 жыл бұрын
Hi Aneesh, ideally if you stop the process from cmd it should stop. May be it has buffered some steps
@sumanthbs25553 жыл бұрын
Sir, How to re-run failed test cases by maven command?
@RaghavPal3 жыл бұрын
You can use testng features for this and run the command with mvn
@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 Жыл бұрын
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.
@HimanshuKumar-rf8kj2 жыл бұрын
How did you autocomplete the XML file while editing , if you can tell that would be a great help :)
@RaghavPal2 жыл бұрын
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-rf8kj2 жыл бұрын
@@RaghavPal Hi sir thanks for the reply , the time for the vidoe is "kzbin.info/www/bejne/ooKmqomvYsxkm5o" . 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)??
@PRINCERAJ-yf6ey2 жыл бұрын
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
@RaghavPal2 жыл бұрын
Hi Prince, what issue you get when you pass url, show me the setup and logs
@barryismaila17234 жыл бұрын
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
@RaghavPal4 жыл бұрын
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.
@barryismaila17234 жыл бұрын
@@RaghavPal thank u for the answer. I'm using junit5 and yes my class test is in src/test/java
@RaghavPal4 жыл бұрын
Okay, try checking with junit 4 stable ver.
@karventhanrangasamy61264 жыл бұрын
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.
@RaghavPal4 жыл бұрын
Hi Karventhan, try to add the library from here maven.apache.org/surefire/maven-surefire-plugin/dependencies.html
@nehashukla36854 жыл бұрын
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-03T<a href="#" class="seekto" data-time="979">16:19</a>:52-<a href="#" class="seekto" data-time="240">04:00</a> [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]
@RaghavPal4 жыл бұрын
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
@tantaatoyvlogs24254 жыл бұрын
when run the tests through maven command line the emailable-report.html is not updating
@RaghavPal4 жыл бұрын
Hi Chandra, it can be due to location issue, Pls check this - stackoverflow.com/questions/44176482/testng-emailable-report-is-not-updating
@NEHAGUPTA-qw9hp4 жыл бұрын
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
@RaghavPal4 жыл бұрын
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
@Emfar2 жыл бұрын
In a gradle selenium project how to run test from testng?
@RaghavPal2 жыл бұрын
I have not done session with gradle, but you can find testng related videos in this playlist
@shivam14274 жыл бұрын
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
@RaghavPal4 жыл бұрын
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
@hazimabdoh63032 жыл бұрын
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.
@RaghavPal2 жыл бұрын
Hi Hazim, hope you are running the command from project folder, Can try on a new cmd
@hazimabdoh63032 жыл бұрын
@@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
@RaghavPal2 жыл бұрын
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
@ramanwalia0074 жыл бұрын
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
@RaghavPal4 жыл бұрын
You can, also check if it goes into a loop
@shalinirakesh34554 жыл бұрын
Good Explanation. I want to execute my selenium tests from command line in a linux machine.How can i do that?
@RaghavPal4 жыл бұрын
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
@shalinirakesh34554 жыл бұрын
@@RaghavPal Thanks a lot. I will try that
@shalinirakesh34554 жыл бұрын
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?
@RaghavPal4 жыл бұрын
Hi Shalini, are you can do with testng parameters - stackoverflow.com/questions/37696990/how-to-pass-parameter-to-testng-in-command-line
@shalinirakesh34554 жыл бұрын
Thank you Raghav. I will try and let you know
@asifuzzamanbappy12974 жыл бұрын
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...
@RaghavPal4 жыл бұрын
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
@ankitathakur19304 жыл бұрын
Hi Raghav.....when I am giving mvn clean install command..... it says mvn is not recognised as an internal or external command.
@RaghavPal4 жыл бұрын
That means maven is not setup on your system. Check how to install maven under Maven section here automationstepbystep.com/
@ankitathakur19304 жыл бұрын
@@RaghavPal Thank u so much
@venkateshbathina32204 жыл бұрын
Hi Raghav , if I am running testng.xml from maven ,test-output folder is not creating in project . Can you please help me here
@RaghavPal4 жыл бұрын
Hi Venkatesh, what is the error, pls check all the steps again
@venkateshbathina32204 жыл бұрын
@@RaghavPal There is no error in command prompt ,but test-output is not getting created in eclipse folder structure (i tried refreshing the folder)
@harinat5 жыл бұрын
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.
@RaghavPal5 жыл бұрын
In java, we can create jar files. I have not yet covered .net, dll etc. Will try to cover these soon
@thellamaswinkumar504 жыл бұрын
@@RaghavPal hi how can we run pom.xml from a jar fule
@chandrasekharnasaka49734 жыл бұрын
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
@RaghavPal4 жыл бұрын
Hi Chandra, I will need to see the setup
@shilupg4 жыл бұрын
Hi Raghav, whether we can use cucumber along with TestNG, if yes how we can run the test suite from command line
@RaghavPal4 жыл бұрын
Yes we can Shilu. I will create a video on that
@shilupg4 жыл бұрын
@@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
@RaghavPal4 жыл бұрын
Okay for now you can refer these links www.lambdatest.com/blog/automation-testing-with-selenium-cucumber-testng/
@pborse3864 жыл бұрын
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
@RaghavPal4 жыл бұрын
Hi Popat, this can help you - stackoverflow.com/questions/13245411/how-to-pass-java-code-a-parameter-from-maven-for-testing
@sudeepsharma69173 жыл бұрын
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-10T<a href="#" class="seekto" data-time="1348">22:28</a>:11-<a href="#" class="seekto" data-time="300">05:00</a> [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?
@RaghavPal3 жыл бұрын
Hi Sudeep, loos like some syntax issue in Excelutilitiesdemo.java Pls check
@sanjanasr14044 жыл бұрын
[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 ?
@RaghavPal4 жыл бұрын
Hi Sanjana, This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes
@prakratiagarwal82374 жыл бұрын
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 ?
@RaghavPal4 жыл бұрын
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.
@kiranshinde82055 жыл бұрын
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
@RaghavPal5 жыл бұрын
Hi Kiran, pls explain in detail and the steps you have tried
@rajeshdevan60515 жыл бұрын
Hi Raghav, could you please explain little bit slowly?
@RaghavPal5 жыл бұрын
Okay Rajesh, in case you are also doing hands-on along with the video, you can pause and resume
@rajeshdevan60515 жыл бұрын
@@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
@RaghavPal5 жыл бұрын
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
@anubhagupta18714 жыл бұрын
Hi I am getting compilation error after running mvn clean test but mvn clean works fine
@RaghavPal4 жыл бұрын
Hi Anubha, will need to see the error details/logs to troubleshoot. Just check what's the reason you get on failure
@ankitshrivastava17724 жыл бұрын
Hi, Raghav i am facing "MAVEN/MojoFailureException" .
@RaghavPal4 жыл бұрын
Hi Ankit, Can you try to run cmd as administrator and try the command again
@Cainprime5 жыл бұрын
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?
@RaghavPal5 жыл бұрын
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
@Cainprime5 жыл бұрын
@@RaghavPal Thank you! This works fine now after adding the target version!
@usmankarim52364 жыл бұрын
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?
@RaghavPal4 жыл бұрын
Hi Usman, will have to see your setup
@usmankarim52364 жыл бұрын
@@RaghavPal how i can show you??
@usmankarim52364 жыл бұрын
@@RaghavPal is there any way i can contact you?
@RaghavPal4 жыл бұрын
Hi Usman you can email me raghav.qna@gmail.com
@yuvraj48705 жыл бұрын
how do we do all this without using IDE at all.
@RaghavPal5 жыл бұрын
Hi Yuvraj, do you mean creating framework and all w/o IDE, It will be difficult.
@yuvraj48705 жыл бұрын
@@RaghavPal Yes all the process you demonstrated but using command prompt only.
@suchetavyavahare17432 жыл бұрын
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-26T<a href="#" class="seekto" data-time="855">14:15</a>:22+<a href="#" class="seekto" data-time="330">05:30</a> [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
@RaghavPal2 жыл бұрын
add this in pom.xml file 1.8 1.8 Can update the ver as per the java ver on your system
@A.B.000075 жыл бұрын
"mvn clean" runs fine but "mvn clean test - with function attribute or without" shows Build Error!!!!!
@RaghavPal5 жыл бұрын
hi Asif, will have to check the setup and logs
@A.B.000075 жыл бұрын
@@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.000075 жыл бұрын
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.000075 жыл бұрын
I fixed it just had to add a dependency in pom.xml build section. Thanks bro.
@smithap38795 жыл бұрын
@@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
@rajeshdevan60515 жыл бұрын
Please Say slowly Sir you are explaining very fast
@RaghavPal5 жыл бұрын
Sure Rajesh, I will take care in future videos
@FazSaber5 жыл бұрын
You can slow down the play speed youtube videos so it's easier to follow. :)
@allenromyn6323 Жыл бұрын
Getting the following C:\Users\**********\eclipse-workspace\automationsmartentry-bitbucket\auotmationsmartentry\testng.xml is not a valid file
@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.
@sachnkn.official Жыл бұрын
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-30T<a href="#" class="seekto" data-time="719">11:59</a>:00+<a href="#" class="seekto" data-time="330">05:30</a> [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 Жыл бұрын
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