TestNG Framework- Selenium Tutorial Part-1

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • TestNG Framework -Selenium Tutorial Part-1:
    +Install & Setup TestNG
    +TestNG Basics - basics of Annotations
    +Write Selenium webDriver code with TestNG integration
    Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    / @naveenautomationlabs
    ~-~~-~~~-~~-~
    Follow my Site/Blog: www.naveenautom...
    ========================================================
    Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
    • Selenium & Automation ...
    ~-~~-~~~-~~-~ Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Paid courses (Recorded) videos:
    Java & Selenium Course: www.naveenautom...
    API Course: www.naveenautom... ➡️Get Our Courses✔️
    📗 Get My Paid Courses at
    Paid courses (Recorded) videos:
    Java & Selenium Course: www.naveenautom...
    API Course: www.naveenautom...
    -------------------------------
    ✔️SOCIAL NETWORKS
    Facebook: / naveenqtpexpert
    Twitter: / naveenkhunteta
    Blog: www.naveenautom...
    --------------------------------
    Support My Channel✔️Or Buy Me A Coffee
    Paypal: paypal.me/nave...
    Google Pay: naveenanimation20@gmail.com
    --------------------------------
    ✔️Thanks for watching!
    देखने के लिए धन्यवाद
    Благодаря за гледането
    感谢您观看
    Merci d'avoir regardé
    Grazie per la visione
    Gracias por ver
    شكرا للمشاهدة

Komentáře • 338

  • @naveenautomationlabs
    @naveenautomationlabs  Před 5 lety +130

    ~~~~~~~~~~~~In this video, just a correction: test cases will be executed as per alphabetic order not random order. ~~~~~~~~~~~~~~~~~~~~~~

    • @umangsharma7447
      @umangsharma7447 Před 5 lety +3

      Hi Naveen, i am using mac for my learning. Problem is i am unable to add a TestNG library in latest Eclipse IDE (4.12) . Is it true that latest eclipse is not able to support TestNG plug-in ?
      Description Resource Path Location Type
      Invalid classpath container: 'TestNG' in project 'LearningSelenium' LearningSelenium Build path Build Path Problem

    • @akashmohanty9627
      @akashmohanty9627 Před 5 lety

      no to overcome alphabetic order we can use "priorit

    • @nitingupta82
      @nitingupta82 Před 5 lety +4

      Exactly!!! This is what I wanted to Point out!! Cheer's!

    • @sanchitgandhi7551
      @sanchitgandhi7551 Před 4 lety

      @@nelakantilavanya remove TestNG libraries from project, re install software from help and try, hopefully it should work.

    • @savitaameti9155
      @savitaameti9155 Před 4 lety

      Hi Naveen,
      Thanks for sharing this informative video. Could you please share me the URL u used to download the TestNG for eclipse here?
      Thanks

  • @priyankas6082
    @priyankas6082 Před 5 lety +5

    This is my third training class - the quality of training I receive continues to be excellent.

  • @prasadmutha7624
    @prasadmutha7624 Před rokem +9

    Hi Naveen , It was very informative video and I am thankful for the same. Just one correction I wish to add here that I have observed in TestNG execution when there are multiple test cases written (without mentioning priority) then execution happens according to alpha-numerical manner of class name ( and not random as mentioned in video). Hope this helps whoever is reading the comment.

    • @premsinghrathore9691
      @premsinghrathore9691 Před rokem

      What do you mean by that, I though it was random?

    • @chinnab3544
      @chinnab3544 Před 8 měsíci

      yes .testNG will take alphabetic order only if we are not provide priority

  • @meghasandesam
    @meghasandesam Před 6 lety +19

    Naveen, after visiting this i had crystal clear clarity on subject. Nice voice and nice explanation. Thank you very much

  • @kitchen-e-kausar9105
    @kitchen-e-kausar9105 Před 3 lety +2

    This video is very thorough, I was looking all over the Internet for tutorials with clear voice, clear explanations, the speed that will match my typing speed etc., and this is the one. I can just type the code along with you as you narrate. Thank you.

  • @varaprasad6911
    @varaprasad6911 Před 5 lety +12

    perfect explanation to know how things work. I really love the way you explain things. Great job bro. Thanks a lot

  • @karthickmohankumar3944
    @karthickmohankumar3944 Před 4 lety +5

    Hi Naveen your way of teaching is excellent, i have gone through your videos for the first time today. i am impressed.. it was good KT(Knowledge transfer) taken from you for the day.... Appreciate all your efforts , patience and hard work.. keep it up.....

  • @lucasfoodvlogger6862
    @lucasfoodvlogger6862 Před 6 lety +1

    From my heart, i am very much thankful to you. Really a person who can explain simply and effectively, god bless you with all knowledge .I believe that if strong skill knowledge then we can sustain in these competitive world.I strongly believe that if you share knowledge ,it will help to eradicate poverty and we can see towards enlightened.

    • @TheSelfbelief1
      @TheSelfbelief1 Před 6 lety +1

      Having said that you have equally a big heart for they way you perceive life

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

    U made life so easy by explaining in such a simple way .. loved way of explaining 👍thank u for making these videos ., it’s so helpful

  • @anjalichawla6036
    @anjalichawla6036 Před 5 lety +14

    Thanks Naveen for the awesome tutorial, You are definitely doing a great job...!!
    One thing from the above video I have a point to share i.e. If we don't write priorities in the Test Annotations they execute it alphabetically, not randomly. Correct me If I have a wrong understanding.

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

    Thank you so much Naveen. I could easily understand the concepts with crystal clear explanation.

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

    Very helpful series thanks for the the clear explanation and covering all questions u r amazing 👍🏼👍🏼

  • @Slade69
    @Slade69 Před 4 lety +9

    One small thing . The order of execution of tests will be dependent on the alphabetical order of the methods , if no priority / dependency is specified

  • @omkarpotdar2763
    @omkarpotdar2763 Před 2 lety

    This is the best video of learning TestNG which I ever see. Thanks a lot Naveen for your hard work.😊

  • @ramyaraghunathan6347
    @ramyaraghunathan6347 Před 2 lety

    Thank you so much for this clear explanation. Your explanation really eases the complexity that minds perceptually have about TestNG. Your step by Step briefing Framework is simply the best.

  • @ManinderSingh-db3qn
    @ManinderSingh-db3qn Před 3 lety +4

    @Naveen : At time 39:01 you said that if the annotation is @Test for 3 test cases it will pick them up randomly. Correction it will execute in the alphabetical order of the method name as the default priority set for them is 0.

  • @priyankasomasundaram2033
    @priyankasomasundaram2033 Před 2 lety +1

    Learning in 2022 ☺️ thanks for the wonderful tutorial video sir

  • @akashmishra6661
    @akashmishra6661 Před rokem

    man u r such a lifesaver. these Videos are necessary

  • @user-yo2qp1tm7p
    @user-yo2qp1tm7p Před 10 měsíci +1

    That was a good session , i am new to testng , now i can understand much better .
    thanks Naveen

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

    Thank you, Naveen !! It is a very clear and good teaching skill, I learn a lot from this video.

  • @jayassssssssssss
    @jayassssssssssss Před 6 lety +2

    Great Explanation Sir.. Thank you Very very much for helping us in learning Automation.

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

    Hi Naveen, My sincere thanks for this detailed and clear concepts. Thank you so much once again.

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

    @Naveen
    At 1:00:30 you said when someone will run the testng test without providing the priority, it will run randomly which is incorrect.
    It will not run randomly, instead, it will sort the test methods alphabetically and then it will execute the test methods.

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

      Yes it's already mentioned in my first comment of the video. It was mentioned incorrectly by me. In later videos of my testng I have corrected it. Thnx for mentioning :)

    • @rahulkantjha
      @rahulkantjha Před 4 lety

      @@naveenautomationlabs Oh ! sorry Naveen it's my bad. I just saw.
      But thanks a lot for all your playlists and especially for Collections.

  • @debopampradhan9247
    @debopampradhan9247 Před rokem

    Thanks Naveen! I just fixed it from your lecture. Thanks for giving information.

  • @maheshbiruda1549
    @maheshbiruda1549 Před 2 lety

    Hi Naveen.., The way your explaining TestNG Frame Work its too good and Thanks

  • @AK-ko1zo
    @AK-ko1zo Před 4 lety +1

    Excellent explanation and clarity .Thank you so much Naveen...

  • @bhavnaarora2293
    @bhavnaarora2293 Před 5 lety +6

    Excellent Tutorial, Thank you so much Naveen!!

  • @rajeevv135
    @rajeevv135 Před 7 lety +2

    Thank you for sharing your insight on selenium. Selenium looks easy after watching your videos. Your explanation is very layman's perspective especially java topics. Looking for more such videos in coming days. Really appreciate if you can cover framework explanation with sample projects. Thank you once again!

    • @naveenautomationlabs
      @naveenautomationlabs  Před 7 lety +1

      +Rajeev V thanks Rajeev! I'm currently working upon vidoes upon framework designing. Will be uploaded soon.

    • @naveenautomationlabs
      @naveenautomationlabs  Před 6 lety

      Hi Rajeev, Hybrid + Page Object Model Framework have been uploaded now. Please refer this playlist: czcams.com/play/PLFGoYjJG_fqq6cHeqfsDes3pdVh3kpl74.html

  • @menkakumaripratibha2687

    Thank you @naveen , you explained very deep and i was looking all the video but this video gave clear explanation that i needed thankuuu so much

  • @suryakumaris4125
    @suryakumaris4125 Před 6 lety +5

    Naveen, you are doing great job.... Thanks for your effort.:)

  • @sridevireddy1371
    @sridevireddy1371 Před 6 lety +1

    Thank you Naveen...very clear and superb teaching.

  • @maheshkhateghare359
    @maheshkhateghare359 Před 2 lety

    This series help me alot for learning automation testing

  • @VijethKulal
    @VijethKulal Před 5 lety +4

    Just a small note :We need to Change : WebDriver driver = new ChromeDriver();
    To : driver = new ChromeDriver(); , so @AfterMethod ,NullPointerException wont arise. Thanks.

  • @wisherz
    @wisherz Před 3 lety

    Thank you so much... all your videos are well explained. i am so happy i have found your channel

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

    Brother .. spoke nicely and explained well. Thanks a lot ..please do more videos.

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

    I cannot thank enough how helpful your videos are for me as a automation beginner. I don’t knw what i would have done without your channel. Such a detailed explanation of everything from a to z. Are u located in US naveen?

    • @naveenautomationlabs
      @naveenautomationlabs  Před 4 lety

      Thanks for watching. I'm here in Bangalore. Mail me at naveenanimation20@gmail.com in case of any queries.

    • @amiereviews5522
      @amiereviews5522 Před 4 lety

      Naveen AutomationLabs : okay sure thanks naveen

  • @ManojGupta-kx9qv
    @ManojGupta-kx9qv Před 5 lety

    Naveen your way of explanation is awesome.you are genius sir

  • @swagatikadas398
    @swagatikadas398 Před 6 lety +1

    The video is awesome and very informative. I can have a clear idea about the sequence of the annotation in TestNG framework. Thank you so much Naveen 😊

  • @fitnessmodeldiet5350
    @fitnessmodeldiet5350 Před 3 lety

    Great explanation this is printed in my subconscious mind.

  • @nitheeshakarnati1237
    @nitheeshakarnati1237 Před 6 lety +2

    Awesome tutorials, very helpful for beginners. Thank you so much for the efforts!

  • @amitaggarwal576
    @amitaggarwal576 Před 3 lety

    Hello sir! Thank you so much. You have come up with great explanation in all the videos.

  • @jameerkhan814
    @jameerkhan814 Před 6 lety +8

    Hi Naveen...It's very nice and i would like to tell u one thing that in TestNG, the test cases will be executed based on the ALPHABETICAL ORDER of the test method names but not randomly... In the above example which u have explained the test cases got executed based on the alphabetical order....Thank you and nice work

  • @jatinkhanna9391
    @jatinkhanna9391 Před rokem +1

    Hi All,
    First of all, Thanks sir for making such amazing video tutorials.
    Secondly,
    Below is the latest replacement for Deprecated Implicitly wait and pageLoadTimeout Code. Hope it will work:
    driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(40));
    driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
    Thanks and Regards,
    Jatin Khanna

  • @ANURAGGUPTA1690
    @ANURAGGUPTA1690 Před 6 lety +1

    very nice video and explanation, thank you for providing these kind of information its very helpful.
    i want to add a point here @Test are executed according to alphabetical order.

  • @chandanwagh3873
    @chandanwagh3873 Před 3 lety

    tutorial quality is awesome very very optimistic great

  • @amrithavarshinits9577
    @amrithavarshinits9577 Před 3 lety

    Hi Naveen, Your sessions are very simple and informative. I would like to share one of my understanding here- @Test methods are picked based on alphabetical order of the test method name if priority keywords are not provided and not randomly.

  • @salimsiddiqui9333
    @salimsiddiqui9333 Před 6 lety +1

    i clearly understand concept of testNG thank you so much sir

  • @jinalshah7023
    @jinalshah7023 Před 3 lety

    Thank You SIR FOR SUCH A WONDERFUL EXPLANATION

  • @manikantabheema9137
    @manikantabheema9137 Před 4 lety

    Thanka for ur hard work and uploading the videos for the people,. Rey excellent Subject and extradinory explanation

  • @poojapawar3665
    @poojapawar3665 Před 6 lety +6

    Your voice is so good love to watch ur videos :)

  • @milanyadav6514
    @milanyadav6514 Před 5 lety

    No words are enough to express gratitude

  • @kaurprabhleen89
    @kaurprabhleen89 Před 6 lety

    Naveen , great explanation !! I would like to add one thing here , if we don't add priority , test cases run in alphabetical order.

  • @aryanaboyaryayeenezhad7295

    Mr. Naveen method number 3 and 4 should be switched cause url should be executed before login.
    but other than that, outstanding job sir.

  • @prashantsharma8128
    @prashantsharma8128 Před 6 lety

    Amazing explanation Naveen sir. Thank you so much for this tutorial i really like it

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

    Thank you, sir Excellent tutorial !!!

  • @vikaspaliwal185
    @vikaspaliwal185 Před 6 lety +1

    Naveen Sir you are awsome thanks for the info..

  • @santhosh4567
    @santhosh4567 Před 4 lety

    Excellent teaching. It's really helpful 👍👍

  • @prashantsoni3279
    @prashantsoni3279 Před 6 lety +3

    Naveen, great video on selenium tutorial but sorry to say that one thing is explained wrong here, @test is not picked randomly, it gets executed alphabetically if priority is not set.

    • @RajChahalNsit
      @RajChahalNsit Před 5 lety

      yes, i was going to mention the same... this is a minor mistake in otherwise a nice video ..

    • @vijaysim1648
      @vijaysim1648 Před 4 lety

      Yes

    • @vijaysim1648
      @vijaysim1648 Před 4 lety

      Please correct this. If not some one blindly follows

  • @srinivasp1190
    @srinivasp1190 Před 3 lety

    Thank you so much, Naveen for your help. These videos are very helpful..:)

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

    You are amazing. Thank you so much the upload.

  • @5shreya
    @5shreya Před 5 lety

    Hello Naveen, You told in this video that if priority is not defined then it will pick the test cases random. However, When I read about it, I found that it runs in alphabetical order (method name).

  • @debojyotibose1143
    @debojyotibose1143 Před 6 lety +3

    Excellent videos, thanks a lot

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

    It was great lecture

  • @natetolbert3671
    @natetolbert3671 Před 3 lety

    Hey you use the double -- as well! I use this all the time. My local filesystem is full with files notated as _date-__-area--desc.-_- I also use it extensively in my git commands. My commit msgs are always structured as : "08162020 -- '''/smallestAffectedScope/ -- Description of changes;"
    And my branches are almost the same : Date--class--name e.g. 08162020--feature--add-new-permission.
    Enough rambling. I am just happy to see that I am not alone...

    • @natetolbert3671
      @natetolbert3671 Před 3 lety

      Evidently markdown uses it as well! That makes 3.... woo...

  • @corejava1169
    @corejava1169 Před 5 lety

    As you told if we don't mention priority then testng pick randomly any test case and execute it.. But I read somewhere if we don't mention priority then by default base on alphabetical order test cases execute.. So please clear this confusion which one is Right??

  • @ayushiprasad5506
    @ayushiprasad5506 Před 5 lety

    thank you Naveen for all the tutorials , really helpful !!

  • @luckydev2293
    @luckydev2293 Před 5 lety

    Thank you sir, for sharing your knowledge and stuff.

  • @Harshaljain7
    @Harshaljain7 Před 3 lety

    Great content and easy explanation great👍🏻

  • @pavankdas3931
    @pavankdas3931 Před 5 lety

    Excellent Explained but it will not pick randomly it will pick according to the alphabetic Order wise test will execute if u r not define the priority.

  • @kousalyamariappan2492
    @kousalyamariappan2492 Před 5 lety +2

    Thank you so much sir. it was very useful :)

  • @amitaggarwal576
    @amitaggarwal576 Před 3 lety

    But there is a doubt in my program one test is depend on previous. so i used depend tag in front of @test.. but i dont want to launch the browser for this method. means i want to run previous method then my dependent method in the same window. plz help what to do in this situation.

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

    Hello Naveen, I am using a maven project and testng framework. Here I have created 2 classes, First class is for Login on the web application [containing different methods/testcases] and second class is for After Login -> Home page[containing different methods/testcases]. So my question is, do I need to launch browser in each class? because I have declared driver as global variable in second class but getting this error: ===============java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "this.driver" is null============== Due to above error I am not able to proceed. Please assist.

  • @arnabsaha6684
    @arnabsaha6684 Před 5 lety +1

    Hi, Naveen why don`t you use "import org.testng.annotations.*;" insted of adding annotation one by one

  • @sulagnachakraborty9570
    @sulagnachakraborty9570 Před 5 lety +1

    Hi Naveen,i love your tutorials.They have helped me a ton to learn,But now i want to implement my knowledge.Let me know some demo sites.Please.Waiting for your reply.

  • @mohanrammanikandan7939

    Good Explanation. Thank you!

  • @shivangichandra5362
    @shivangichandra5362 Před 3 lety

    Can a annotation be linked to only one method? Since when there are multiple pre-conditions /post-conditions how to handle that?

  • @rktripathi4008
    @rktripathi4008 Před 4 lety

    Kindly upload your all video sequence wise according to topic in playlist box, so that it's lokk easily to find by anyone.
    Thanks

  • @kenjalgundecha5870
    @kenjalgundecha5870 Před 6 lety +2

    very nice explanation!!!!!!!!!

  • @sharmapinky6820
    @sharmapinky6820 Před 6 lety +1

    Really helpful....i wanted to know about test management tools as well....if u can tel us about it.

  • @AshShrawane
    @AshShrawane Před 5 lety

    Great Work! Really Helpful, Thanks a ton Naveen!!

  • @ananyaaniketkulkarni6461
    @ananyaaniketkulkarni6461 Před 2 měsíci

    @naveenautomationlabs can you upload video that inform about hibernate with TestNG

  • @prasanthikavati1056
    @prasanthikavati1056 Před 6 lety

    Great Job....Thanks for your video

  • @user-ef1og4lj2l
    @user-ef1og4lj2l Před 10 měsíci

    The official site of TestNG mentions- "TestNG is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc...".. is it correct to say it is unit testing framework?

  • @prikshitverma3885
    @prikshitverma3885 Před 3 lety

    Dhanyawad !!! Mr. Naveen!!!

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

    Sir NIce explanation ,

  • @tomaspyth7017
    @tomaspyth7017 Před 5 lety +4

    Hallo naveem,
    Please consider in upcoming Tutorials may be to increase the font in order to make it readable especially for small devices like smartphones...
    As orientation how that would look s like i would suggest the mosh hamedani Canal
    Nevertheless, thanks a lot for sharing your knowledge with us

  • @HimanshuSharma-yj8nd
    @HimanshuSharma-yj8nd Před 2 lety

    I want learn under selenium session classes you made please provide me the play list of your channel so i learn those topics as well

  • @pawantyagi1993
    @pawantyagi1993 Před 3 lety

    @Naveen sir What would happen if we have two methods @BeforeMethod and @AfterMethod and we have written driver.quit in @BeforeMethod method and System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver.exe");
    WebDriver driver = new ChromeDriver(); driver.get(""); in @AfterMethod ? Will system gives error message ?

  • @kumarhi9564
    @kumarhi9564 Před 4 lety

    Hi , how to launch browser one time and run all our @tests instead of launching browser for every @test

  • @pranavbhatia8163
    @pranavbhatia8163 Před 3 lety

    Was just wondering -
    Why do we have to open and close the browser multiple times when all the three tests can be performed together in one go?

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

    Hi Naveen, Why I can't install testNG on eclipse oxygen or newer version?

  • @kalyaniacharekar4808
    @kalyaniacharekar4808 Před 2 lety

    Hi Naveen, your videos are so good, I like the way you explain, I had one doubt, I'm using chromedriver 94 as my chrome version is 94 + , but when browser is launched that time by default settings window is opening, can u please suggest what to do in this case.

  • @truthsacrament369
    @truthsacrament369 Před 5 lety

    Nice explanation... Thank you Naveen 😊

  • @manaligupta1098
    @manaligupta1098 Před 7 lety +1

    Very informative sir!

  • @mohmashooqdowlati7933
    @mohmashooqdowlati7933 Před 4 lety

    In terms of sequence, should'n the url be launched before login operation? who knows, maybe i am confused!

  • @Star-vg7ix
    @Star-vg7ix Před rokem

    Please try zooming in on your screen for next time. Good topic coverage.

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

    God bless you 🙏

  • @sumitbhaware6205
    @sumitbhaware6205 Před 2 lety

    Hi, Naveen.
    While executing my test class in eclipse, using TestNg so getting an error as "Can not write result as there is no active result writer attached to this".
    Can you please look into it and provide any workaround so I can handle it.
    Thanks

  • @anupamasundarkar7548
    @anupamasundarkar7548 Před 3 lety

    Hi Naveen can you or anyone else please tell me that why the url that you used to install testNG is not available now? is it not working nw? which url to use?

  • @lavanyareddy4284
    @lavanyareddy4284 Před 3 lety

    I'm not able to install TestNG from the given url directly in eclipse. what's the problem naveen.