Selenium Framework - Part 21 - Eavesdropping your tests - TestNG Listeners

  Рет қаралды 6,098

Testing Mini Bytes

Testing Mini Bytes

Күн бұрын

Hi All,
In this video, I tried to cover all the important testng listeners in detail,
Understanding ITestListener
Understanding ISuiteListener
Understanding IMethodInterceptor
Understanding IRetryListener
Understanding IAnnotationTransformer
How to disable a test at runtime?
What is the use of these listeners?
Is re-running failed tests a good practice?

Пікірлер: 36
@bharathkoneru4008
@bharathkoneru4008 3 жыл бұрын
Hope this might help someone who wants to customize the methods list to execute as explained in-depth by Amuthan brother. //CONNECT to excel file & read the data //Store the details of each test case in a separate HashMap List result = new ArrayList(); List list = new ArrayList(); try { DataFormatter format = new DataFormatter(); FileInputStream fis = new FileInputStream(System.getProperty("user.dir")+"/Excel/TestCaseParameters.xlsx"); Workbook wb = WorkbookFactory.create(fis); Sheet excelSheet = wb.getSheetAt(0); Map map; for(int row=1; row
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Bharath, Thanks a lot for your feedback. I really really appreciate that. I am really happy that you are learning new things. Happy learning 😄
@eswar2294
@eswar2294 8 ай бұрын
@@TestingMiniBytes14:45 methods.get(0) is returning me indexoutofbound exception 😢
@supriyassampath1419
@supriyassampath1419 2 жыл бұрын
Amazingly good videos for framework.. learning unique ways of implementation... You never ever find this standard content on selenium automation framework.. thank you so much Amuthan.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Thanks Supriya for your feedback.
@sheikhalitasfin6688
@sheikhalitasfin6688 2 жыл бұрын
Thanks!
@Payazee
@Payazee 3 жыл бұрын
IMethodInstance you explained it very well. this is very nice tutorial
@ArunKumararunpgb
@ArunKumararunpgb 3 жыл бұрын
Millions of thanks Anna, Very very Helpful for us :)
@lka5968
@lka5968 3 жыл бұрын
good knowledgeable video, thanks
@meganathansentamil4645
@meganathansentamil4645 3 жыл бұрын
Appreciate your hard work . All the best for your upcoming vedios.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Thanks a lot Mega !! :)
@bharatvarshney5332
@bharatvarshney5332 3 жыл бұрын
Thanks for sharing selenium videos kudos!!!!
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
You are welcome Bharat 😄 Keep watching testing mini bytes 👍🙏
@MrHaveraj
@MrHaveraj 3 жыл бұрын
Amudhan, your explanation is more practical and good. Please keep us posted interesting videos. By the way one clarification regarding parallel attributes used in testng. 1. When to use parallel =instance. 2. What actually happens if does
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
It will run all the methods in the same instance in same thread. I never used that and please go through official docs or try it yourself.
@sureshgarine
@sureshgarine 6 ай бұрын
Thank you Amuthan, I never come across anyone explained listener to this level of depth.can u do a vidoe on IHookable listener as well
@eswar2294
@eswar2294 8 ай бұрын
Hi Amuthan, at 14:08, when i run the script , it’s failing due to arrayoutofbound exception . when i pass results.add(methods.get(0)); Could you please help me on this.
@TestingMiniBytes
@TestingMiniBytes 8 ай бұрын
I need to check why it does not do that.
@prashantmahajantanashah
@prashantmahajantanashah 3 ай бұрын
Thanks Amuthan for the awesome video! Can you help me understand. why the output in this case only executes test 1 5 times. My test3 did not run even though it is in the list and enabled. Why? public class AnnotationTransformer implements IAnnotationTransformer{ @Override public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod, Class occurringClazz) { if(testMethod.getName().equalsIgnoreCase("test3")) { annotation.setEnabled(false); } HashMap test1= new HashMap(); test1.put("name", "test1"); test1.put("enabled", true); HashMap test2= new HashMap(); test2.put("name", "test2"); test2.put("enabled", false); HashMap test3= new HashMap(); test3.put("name", "test3"); test3.put("enabled", true); List list=new ArrayList(); list.add(test2); list.add(test3); list.add(test1);//5 System.out.println(list); for(int i=0;i
@jwalakumar9434
@jwalakumar9434 2 жыл бұрын
bro, I agree that IRetryListener is not much helpful. but sometimes while running the script if the network connection is slow or the web element is not loaded then in such instances retrying for failed test cases becomes helpful.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Develop your tests to even run on poor network
@9745754904
@9745754904 3 жыл бұрын
Hi Amruthan ,thanks for sharing this In formative video...1 doubt for ex: my tc fails if my net is slow Or any other reasons ,will it be good to have retryanalyser in that case
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Jino, Imagine that your tests fails even after retrying because of the bad internet speed. So it is okay to fail in the first attempt rather than 2 attempts. It is just my way of approaching this problem from my experience. If you have viewed the other side of coin may be you can proceed with using retry mechanisms.
@digvijaytikka1917
@digvijaytikka1917 3 жыл бұрын
which "dependencies" will be needing for using Listeners
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Testng dependency. In the latest version of testng it has become default method and hence you have liberty to override or not. Just type the method instead of expecting ide to populate methods for you.
@digvijaytikka1917
@digvijaytikka1917 3 жыл бұрын
@@TestingMiniBytes Ok thanks
@dishankramawat1088
@dishankramawat1088 2 жыл бұрын
Hi Amuthan, Data Provider video and Listener and runner this video I've not coded parallelly because we have not implemented these in our framework except one data provider is it fine?
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
That's fine
@sp38860
@sp38860 4 жыл бұрын
Hi sir , can you please help me how to set priority to test cases at runtime , I tried doing but the test cases are not executing based on the set priorities in excel . Thank you again sir these series is helping me a lot
@TestingMiniBytes
@TestingMiniBytes 4 жыл бұрын
Hi Sandesh, I will cover that as part of the framework integration with listeners. It is almost similar to the approach what I covered here to change the invocation count at runtime. Thanks a lot for writing your feedback. Keep learning :)
@TestingMiniBytes
@TestingMiniBytes 4 жыл бұрын
Just a request from my side, Please address me as Amuthan. I would be happier if you address me as Amuthan.
@sp38860
@sp38860 4 жыл бұрын
@@TestingMiniBytes Thank you 🙏 eagerly waiting for it .👍
@Ashleysarash
@Ashleysarash 2 жыл бұрын
share the git for this code
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
Pls check my github
@ctacts
@ctacts 4 ай бұрын
Learn new thing related to Listeners.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 37 МЛН
小路飞和小丑也太帅了#家庭#搞笑 #funny #小丑 #cosplay
00:13
家庭搞笑日记
Рет қаралды 17 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 11 МЛН
Postman Api Testing Tutorial for beginners
16:45
Codemify
Рет қаралды 58 М.
Selenium Framework - Part 47 - What is a Docker Image?
18:29
Testing Mini Bytes
Рет қаралды 3,1 М.
How I moved to US from India on H1B | What you should know |
14:18
Testing Mini Bytes
Рет қаралды 1,8 М.
What is OpenTelemetry?
12:55
Highlight
Рет қаралды 15 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 37 МЛН