Mastering Parallel Execution: Overcoming Challenges in Selenium Testing || TestNG

  Рет қаралды 2,818

PrinceAutomationDestination

PrinceAutomationDestination

6 ай бұрын

Hello Everyone,
Welcome to my channel PrinceAutomationDestination.
🚀 Parallel Execution Challenges & Resolution in TestNG:
📌 Parallel Execution is one of the important aspect of Test Automation framework as it helps in achieving quick execution.
As a result it become important Interview question to Automation Engineers. So, Today's topic is parallel Execution challenges and resolution in TestNG Framework.
📌 How do you achieve parallel Execution in your TestNG based Automation Framework
Answer from most of people is:
1. provide parallel = methods|tests|class
2. provide thread-count=2|3|4|5
But are not aware about, How thread safety is being taken care i.e. how to avoid interference of parallelly executing Threads.
📌 Challenges with Automation Implementation:
✅ We need a single isolated driver per Thread and by default when we create static/Singleton driver instance, it is not Thread Safe
So, We get Thread Interference and as a result we get uneven results of execution and come across following errors
1. NullPointerException
2. SessionNotCreated
3. NoSuchElementException
4. and So On
📌 BIG Question is: How to resolve it
✅ There is a concept of Thread Local Class in Java using which we can store the value of variable for each thread and same thread would be able to retrieve it and thus avoid interference of threads.
✅ So we are going to use the same concept in case of Parallel Execution by creating Thread Local Instance for both static as well as Singleton Instances
Link to Repo:
github.com/prnbtr09/parallelE...
Singleton Design Pattern:
• Unlocking Efficiency: ...
Regards,
PrinceAutomationDestination

Пікірлер: 51
@balajivivek8662
@balajivivek8662 4 ай бұрын
This is one of the hidden gem on TestNg with parallel execution challenges. Nicely explained . Hats off
@PrinceAutomationDestination
@PrinceAutomationDestination 4 ай бұрын
Thanks buddy
@balajivivek8662
@balajivivek8662 4 ай бұрын
Is there similar content for test data management , test report management for parallel execution.
@PrinceAutomationDestination
@PrinceAutomationDestination 4 ай бұрын
Not so far but I will try creating soon
@balajivivek8662
@balajivivek8662 4 ай бұрын
@@PrinceAutomationDestination ok thanks for the consideration . I think the test data supply via data providers or json should be thread safe . Else it will create a issue in parallel executions . The same applies to reporting as well when we are using extent report or allure .. All should be thread safe
@balajivivek8662
@balajivivek8662 4 ай бұрын
Awaiting your video for the above mentioned challenges.
@vikashkeshri5849
@vikashkeshri5849 Ай бұрын
Very good explaination in detail with working code...Cheers
@PrinceAutomationDestination
@PrinceAutomationDestination Ай бұрын
Thanks
@sahiljoshi7917
@sahiljoshi7917 2 ай бұрын
Thank you for sharing this fascinating video; I hope this is the finest explanation.
@PrinceAutomationDestination
@PrinceAutomationDestination 2 ай бұрын
Thanks
@atularora5271
@atularora5271 6 ай бұрын
Very well Explained Prince Sir..!
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Thanks Atul
@jainshraddha8165
@jainshraddha8165 5 ай бұрын
Great explanation
@PrinceAutomationDestination
@PrinceAutomationDestination 5 ай бұрын
Thanks 🙏🏼
@bongtube1983
@bongtube1983 4 ай бұрын
Very nicely explained tutorial Sir, thank you very much !!
@PrinceAutomationDestination
@PrinceAutomationDestination 4 ай бұрын
Welcome
@rohittanwar2395
@rohittanwar2395 6 ай бұрын
Good explanation
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Thanks
@Karthickraj.pattabi
@Karthickraj.pattabi 6 ай бұрын
Prince great content. no words to express...love you man
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Thanks
@RunwayRahul
@RunwayRahul 6 ай бұрын
Good explanation ❤ As per my opinion for better understanding any topic start with new project then easy to fallow up your code Thank You
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Thanks Rahul, will surely do so. Let us connect on linkedin and discuss more: www.linkedin.com/in/prince-kumar-7b389a68?
@karthikeyans52
@karthikeyans52 6 ай бұрын
Thanks for the clear cut explanation 👍🏻👍🏻
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Welcome 🤗
@soumya171190
@soumya171190 5 ай бұрын
Well documented content
@PrinceAutomationDestination
@PrinceAutomationDestination 5 ай бұрын
Thanks Soumya
@youssefkorbi-mt7nv
@youssefkorbi-mt7nv 4 ай бұрын
Thanks for the clear cut explanation
@PrinceAutomationDestination
@PrinceAutomationDestination 4 ай бұрын
Welcome
@nagasaimaddula56
@nagasaimaddula56 2 ай бұрын
Great explanation 🎉
@PrinceAutomationDestination
@PrinceAutomationDestination 2 ай бұрын
Thanks
@swaroopnadella
@swaroopnadella 2 ай бұрын
Very good explanation 👏
@PrinceAutomationDestination
@PrinceAutomationDestination 2 ай бұрын
Thanks buddy
@Elliot-792
@Elliot-792 5 ай бұрын
Great Content Man !!!!
@PrinceAutomationDestination
@PrinceAutomationDestination 5 ай бұрын
🙏🏼 Thanks buddy
@user-mo4hu1ev6m
@user-mo4hu1ev6m Ай бұрын
Thank you for this video, I also use singleton trying your example but my tests are failed
@PrinceAutomationDestination
@PrinceAutomationDestination Ай бұрын
Have you used thread local or let us connect at telegram t.me/+dSqXNMdtm0wxOTRl
@user-mo4hu1ev6m
@user-mo4hu1ev6m Ай бұрын
@@PrinceAutomationDestination yes, I used
@spidyniks
@spidyniks 6 ай бұрын
Good explanation, would like to see more videos on your playlist
@PrinceAutomationDestination
@PrinceAutomationDestination 6 ай бұрын
Thanks Nikhil, for sure please checkout my other videos i will add some more here in this playlist soon
@Elliot-792
@Elliot-792 5 ай бұрын
Post a video on Crossbrowser testing with some realtime examples sir
@PrinceAutomationDestination
@PrinceAutomationDestination 5 ай бұрын
Sure will post www.linkedin.com/in/prince-kumar-7b389a68? Let us connect on LinkedIn
@throwyourmindat
@throwyourmindat 2 ай бұрын
Hi Can you please suggest similar examples using junit also!? How the code you have written should work with junit !? And thanks for the clear n precise explanation 🙏
@PrinceAutomationDestination
@PrinceAutomationDestination 2 ай бұрын
Junit 5 ?
@throwyourmindat
@throwyourmindat 2 ай бұрын
@@PrinceAutomationDestination yes please
@PrinceAutomationDestination
@PrinceAutomationDestination 2 ай бұрын
Sure
@hashirhasmy1042
@hashirhasmy1042 29 күн бұрын
is it possible to assign returning driver value from singelton class to normal driver like this from test case having class. Webdriver driver = CrrateDriver.getInstance.getDriver(); is this approach fine to use driver reference variable in side test class
@PrinceAutomationDestination
@PrinceAutomationDestination 29 күн бұрын
Yes
@hashirhasmy1042
@hashirhasmy1042 10 күн бұрын
@@PrinceAutomationDestination Can you share your GitHub link sir
@PrinceAutomationDestination
@PrinceAutomationDestination 8 күн бұрын
github.com/prnbtr09/parallelExecutionChallengesTestNG Sure
Unlocking the Power of Pseudo-Elements: Interacting with Selenium in Java
12:28
PrinceAutomationDestination
Рет қаралды 845
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 16 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
How Will Test Automation Change In The Future? | Namaste Tech Talks 01
17:02
Test Automation Framework InterviewQ&A For SDET/Automation QA - 2024
28:39
AutomateWithSidharth
Рет қаралды 4,1 М.
Cross browser testing using Selenium and TestNG
15:02
SDET Adda For QA Automation
Рет қаралды 15 М.
Tutorial 10:TestNG with intelliJ IDE| Parallel Tests
28:01
SDET- QA
Рет қаралды 51 М.
P25 - TestNG Listeners | TestNG | Testing Framework | ITestListener |
55:35
İĞNE İLE TELEFON TEMİZLEMEK!🤯
0:17
Safak Novruz
Рет қаралды 1,6 МЛН
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 358 М.
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 28 МЛН