Selenium Framework - Part 7 - Fixing Parallel execution issues in Selenium -Thank you Thread Local

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 78

  • @Udzial
    @Udzial Рік тому +2

    Awesome from simple to expert level everything in one video. Since i have seen your java 8 series video. All of the last part Anonymous inner class etc made proper sense.
    Thanks for taking automation to another level.

  • @jaysree3678
    @jaysree3678 3 роки тому +3

    Great Content to understand Thread local. Setting Initital value using Thread local is a new thing I learned today. Waiting to learn more new concepts.

  • @gayathrivr
    @gayathrivr 3 роки тому +4

    Tons of thanks for your video I finally sorted out my issue.

  • @madhureddy8456
    @madhureddy8456 3 роки тому +1

    thanks for the detailed explanation on LocalThread I tried many videos, but you explanation is best

  • @nagarajsastry3887
    @nagarajsastry3887 3 роки тому +3

    Thank you for the detailed explanation on LocalThread class, able to achieve with cross browser using TestNG and ThreadLocal

  • @ashteshdiwakar276
    @ashteshdiwakar276 3 роки тому +1

    Thank you soo much for knowledge sharing.
    This is really some advance things which i had no idea about.
    Really glad to checkout this channel.
    Keep up the good work.

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      Glad you liked it. Please check out the other videos as well.

  • @ctacts
    @ctacts 5 місяців тому +1

    It is very well explained with examples

  • @avikroychoudhury3858
    @avikroychoudhury3858 4 роки тому +1

    Thanks Amuthan for the clear explanation. Waiting for the next videos :)

  • @Payazee
    @Payazee 3 роки тому +2

    13:15 will it unload all the thread execution even if some thread are slow and still executing?

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +1

      remove method should be called at the end to remove the value safely

    • @Payazee
      @Payazee 3 роки тому +1

      @@TestingMiniBytes cool, learned new concept :) nice indepth concept covered

  • @ameeruddin9986
    @ameeruddin9986 4 роки тому +1

    Awesome video....go ahead and post more videos

  • @Payazee
    @Payazee 3 роки тому +1

    10:07 so here two driver instance are created for parallel execution?

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +2

      Thread local will create two different copies for two different threads

  • @sumitrawat9323
    @sumitrawat9323 3 роки тому +1

    Thank you for the video. Helped a lot.

  • @sunilkumarakumalla1265
    @sunilkumarakumalla1265 4 роки тому +8

    Amazing content Keep going @Amuthan Sakthivel... One query Around Threadcount & Parallel execution. you have created one test method each in both Home and login classes and tried to give the thread-count as 2 with parallel on methods which is working fine but when you try to add one more method in either home or login classes then it will either skip or failing the test. since it is already closing the driver and not able to find the driver instance. when i change the thread count to >2 then it is working fine. Please check and explain a bit if we have more than one method for a class. Thanks in advance :)

    • @TestingMiniBytes
      @TestingMiniBytes  4 роки тому +1

      Ha ha !! Good catch. I forget to update driver to DriverManager.getDriver() in if condition, that would have caused the issue. I already noted that. We will go one more round of fixing small issue in the next video!!

    • @sunilkumarakumalla1265
      @sunilkumarakumalla1265 4 роки тому +1

      I have updated it with drivermanager.getdriver and it's working fine now 👍🏼

    • @TestingMiniBytes
      @TestingMiniBytes  4 роки тому

      @@sunilkumarakumalla1265 It will be covered in next video anyways!!. I am glad you are learning well!!

    • @ashishuniyal3429
      @ashishuniyal3429 3 роки тому

      I faced similar issue, I had to comment out everything to get to the actual issue. Thanks Sunil Kumar and Amuthan Sakthivel

  • @shruthirampure3344
    @shruthirampure3344 4 місяці тому +1

    Thank you issue solved 🎉

  • @shreeyabhosale1456
    @shreeyabhosale1456 3 роки тому +1

    this really good content.Thanks

  • @manishpatidar5379
    @manishpatidar5379 3 роки тому +1

    Very well explained...

  • @jaykavin2215
    @jaykavin2215 4 роки тому +2

    Very useful 👍

  • @raghavendrabk8360
    @raghavendrabk8360 2 роки тому

    Hi Amuthan,
    Thanks for this video, instead of using a static webdriver is it not good to use a nonstatic webdriver and use dependency injection (pico container) and share the driver instance between different classes.

  • @anyaslol
    @anyaslol 2 роки тому +1

    Great explanation. I have one question- I am running a parallel execution of my application in two browser with different thread.Now from the two browser I am trying to fetch the transaction id attributes using driver.findelements but I can see only one txn-id is fetching at runtime. I observed which ever the browser opens first that application txn id gets overwritten by second one and gets stored in the List interface. How to resolve this issue. Please suggest how to capture these multiple txn-id

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      You have to store it in ThreadLocal variable. If the txn id is static variable it will be shared with threads.

  • @boss6378
    @boss6378 3 роки тому +3

    Hey ur videos are very informative .Keep it up!! Also i have 1 question why are u using static web driver ?if u want to run them in parallel just declare them public WebDriver driver?it works?

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +1

      Hi Boss,
      I am glad that you find this video useful. May i request to you to watch the part 5 and part 6 to understand why i cannot use public webdriver driver..
      If you have time please watch the whole series so you can understand everything clearly. I am sure you ll enjoy the learning 😄

    • @boss6378
      @boss6378 3 роки тому +1

      @@TestingMiniBytes I know with static webdriver we are facing some issues and thats why you use ThreadLocal.I want to say that if we declare our webdriver as public WebDriver driver.Then all our testcase will run without any issue.

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +2

      @@boss6378 if you use without static you are creating lot of variables at the end. If you want to run more tests in parallel then you also need to think about memory management.
      When there is easy and efficient way we need to use that.

  • @samarthjain5170
    @samarthjain5170 3 роки тому

    Hi Amuthan,
    Why r we creating threadlocal driver as static?

  • @shashank.pandey
    @shashank.pandey 3 роки тому +1

    Hi Amuthan, Your videos are informative. I have one question it is giving null pointer exception for one of the test when I am not adding parallel parameter in TestNG but using threadlocal variable in classes.

    • @shashank.pandey
      @shashank.pandey 3 роки тому

      it got resolved after changing the if condition...thanks

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      Hi Shashank,
      I am glad that you liked my content. Are you following the series from the start if not could you please spare some time to watch part 5 and Part 6 of this selenium framework series to understand this issue in detail.
      I cannot comment on your question without seeing the code or other meta info.
      I would request you to watch the series from part I to the end which can give you lot of knowledge to solve all these issues by yourself.
      Happy learning 😄

  • @ravipantar5511
    @ravipantar5511 3 роки тому +1

    Hi Amruthan,
    your videos are informative ,i followed your videos from beginning. while running test parallelly i am getting null pointer exception after using Thread Local class in code.

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      Hi Ravi,
      I am glad that you find my videos informative. Null pointer exception can happen anytime and not specifically because of using thread local.
      So please follow the exact steps mentioned in the video and practice.
      Or make sure to debug the whole scenario to replicate the behaviour

  • @shanthkumar4709
    @shanthkumar4709 Рік тому

    How to achieve this for C# Nunit framework.. any ideas helps a lot … Thanks

  • @sreekanthkamal7680
    @sreekanthkamal7680 3 роки тому +1

    Hi, parallel execution is not working for me , giving null pointer exception. Could you please help me in solving this?.but, I could able to run individually.

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      Null pointer can happen because of multiple reasons. Please watch the tutorial and replicate the same.

  • @pujasaha5452
    @pujasaha5452 2 роки тому +1

    Hi Amuthan..really great content. I tried the exact thing but its working fine sometimes but sometimes giving "StaleElementReferenceException".

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      Don't use page factory. Stale element is different exception. I have also covered at the end how to fix that using lambda

    • @pujasaha5452
      @pujasaha5452 2 роки тому

      @@TestingMiniBytes Thank you for the prompt reply but till now I haven't used Pagefactory still the code is behaving inconsistant. Sometimes both test cases running fine in parallel but sometimes only one test case is running and the other test case failing with StaleElementReferenceException.

  • @dineshkumaar2117
    @dineshkumaar2117 3 роки тому +1

    Thanks Amuthan , the session was very informative and it would be great if you could share the git hub link

  • @okey1317
    @okey1317 2 роки тому

    18:50 why is that driver variable still there? in line number 17

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      Will be removed in the next video.

    • @okey1317
      @okey1317 2 роки тому +1

      @@TestingMiniBytes Thanks, btw, do you have a github link to this project? could you share

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      @@okey1317 github.com/amuthansakthivel/SeleniumAutomationFramework_UA-cam

  • @chaitanyabuddi5968
    @chaitanyabuddi5968 2 роки тому +1

    Hi Amuthan .. Can you please do a video on file(any extension) download and verifying the data in the file

  • @ronakbhatt2153
    @ronakbhatt2153 3 роки тому +1

    Hello is there any jar file available alternative thread.sleep in java?

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      In apache commons use uninteruppiles class methods.

  • @mayurmalik02
    @mayurmalik02 3 роки тому +1

    hey it is working fine when we perform our actions in our @testmethod , can you please help how to implement threadlocal concept using page factory design pattern i'm facing issues it would be great help if you can make one video on this topic also

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +1

      It has nothing to do woth page factory. But it will be covered in upcoming videos

    • @mayurmalik02
      @mayurmalik02 3 роки тому +1

      @@TestingMiniBytes hi thanks for the prompt reply now I’m able to implement with page factory also i was doing some minor mistakes , but waiting for your video to get better and clear understanding on this topic

  • @VintageVibes
    @VintageVibes Рік тому +1

    good one

  • @mjj3tube
    @mjj3tube 2 роки тому

    HI Amuthan! I had a quick question , @11.00 what should be the hierarchy for get and set method ? I feel we should first set the driver and get it right ? I stand to be corrected.😀

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      That is correct to set the values to the Threadlocal and then we can get the values

    • @mjj3tube
      @mjj3tube 2 роки тому

      @@TestingMiniBytes Thanks thala.

  • @shaikfaruk4679
    @shaikfaruk4679 2 роки тому +1

    I followed as your way but is not working could please help me to resolve This. It is working for one browser only i used thread local

  • @Payazee
    @Payazee 3 роки тому +1

    Is there a way to support BDD cucumber with this framework along with testNG?

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому

      Will do soon. But you can add cucumber later easily

  • @junaid9392
    @junaid9392 2 роки тому

    Hi TMB, thanks for this video.. this made my day. Was stuck on parallel execution for last 4 days. Can I get the framework source code as well?

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому

      github.com/amuthansakthivel/SeleniumAutomationFramework_UA-cam

  • @sreedilse143
    @sreedilse143 2 роки тому +1

    kudos

  • @karthic5231
    @karthic5231 2 роки тому

    Can you explain how to implement theeadlocal in rest assured with data provider as a xlsx sheet through input to passed into each APIs while executing serial is working fine but in parellel as you told it's not working in pure java oriented API AUTOMATION using rest assured

    • @TestingMiniBytes
      @TestingMiniBytes  2 роки тому +1

      Ask these doubts in telegram group with code and screenshots

    • @shanthkumar4709
      @shanthkumar4709 Рік тому

      Please share the telegram group we wanna join

  • @geethanandana6738
    @geethanandana6738 3 роки тому +1

    Video is good.. but voice is very low...

    • @TestingMiniBytes
      @TestingMiniBytes  3 роки тому +1

      Please try watching the next videos, i have worked on the audio quality

  • @amitchauhan1505
    @amitchauhan1505 3 роки тому

    Whats the need of setting a default value? Reason is not clear from the session. @ua-cam.com/video/-7zA8KnFa9w/v-deo.html