No video

Selenium Framework for Beginners 20 | What are TestNG Listeners | How to use TestNG Listeners

  Рет қаралды 45,404

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер: 69
@sokoeurnchhay3463
@sokoeurnchhay3463 9 сағат бұрын
Hello. How can I get auto suggest umimplement methods After I typed implements ITestListeners Interface.
@ankitchoudhary9
@ankitchoudhary9 3 жыл бұрын
As always sir "the best explanation one can get"
@RaghavPal
@RaghavPal 3 жыл бұрын
Thanks a lot Ankit
@lavbhatt6512
@lavbhatt6512 3 жыл бұрын
sir you are great you have explained it so well and in such an easy manner , big thanks from my side :)
@RaghavPal
@RaghavPal 3 жыл бұрын
You are most welcome Lav
@vaishalilahudkar2795
@vaishalilahudkar2795 2 жыл бұрын
Its a very useful.Thanks
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Vaishali
@sipun123rocks
@sipun123rocks 4 жыл бұрын
Sir you are great..can you post a video how to use sauce labs for mobile testing.you have posted for web and it's very helpful.
@RaghavPal
@RaghavPal 4 жыл бұрын
I will try to do that Jayaprakash
@srija_sk
@srija_sk 2 жыл бұрын
Hi Sir, I've imported ITestListener package, still it is not showing any red line under the classname 'Listener'. so I'm not able to add unimplemented methods. Please help me where I'm going wrong?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi, will need to check the logs and troubleshoot
@muzisadventure7660
@muzisadventure7660 3 жыл бұрын
Hi Raghav, I am not getting to error to add unimplemented method for ITestListner. Can you please let me know. I have restarted eclipse. But still getting same error. Please help.
@RaghavPal
@RaghavPal 3 жыл бұрын
Just check if all the required dependencies are added in pom.xml
@srivenkatanathann1630
@srivenkatanathann1630 3 жыл бұрын
Hi Raghav, I am also not able to get all the unimplemented methods by default, what to do?
@RaghavPal
@RaghavPal 3 жыл бұрын
will need to see if you have added the required lib and did the setup properly
@nedhishetty1315
@nedhishetty1315 3 жыл бұрын
Hi Sir, I have followed all the steps as explained in this video but when I execute with the testng.xml it shows the output twice....as below: ************Test Started: test1 ************Test Started: test1 I am inside test1 ************Test Successful: test1 ************Test Successful: test1 ************Test Started: test2 ************Test Started: test2 I am inside test2 ************Test failed: test2 ************Test failed: test2 ************Test Started: test3 ************Test Started: test3 I am inside test3 ************Test Skipped: test3 ************Test Skipped: test3 ************All Tests Completed: Test ************All Tests Completed: Test =============================================== Suite Total tests run: 3, Failures: 1, Skips: 1 =============================================== But when I execute directly from the Class then it shows the proper output as shown in your video. Can you please help me out here..
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Nedhi, check this can help stackoverflow.com/questions/20715802/how-do-i-get-a-testng-report-to-show-console-output
@FazSaber
@FazSaber 5 жыл бұрын
Would you use listeners with Extent reporter? So if a test fails, you can say take a screenshot to add to the report?
@RaghavPal
@RaghavPal 5 жыл бұрын
Yes that is very much practiced Paul
@NishantRanjan2811
@NishantRanjan2811 2 жыл бұрын
You are a Gem. I really appreciate all the work you are doing. Thank you so much.
@RaghavPal
@RaghavPal 2 жыл бұрын
You are so welcome Nishant
@yogisingh170
@yogisingh170 4 жыл бұрын
Hi Sir, I am facing below error when I run the test from xml. Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Yogi, this should help - stackoverflow.com/questions/49339698/org-testng-testngexception-sun-security-provider-certpath-suncertpathbuilderexc
@maharaj92
@maharaj92 3 жыл бұрын
Not able to use groups if listeners is getting usedIt throwing error
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Aniket, will need to check on this
@nistan5404
@nistan5404 4 жыл бұрын
Hi Raghav, I m following all the steps as you mentioned in video but I m not getting any error to add the unimplemented methods...I also restarted eclipse...but issue remains same...my testNG version is "7.1.0". package Listeners; import org.testng.ITestListener; public class TestNGListeners implements ITestListener { }
@nistan5404
@nistan5404 4 жыл бұрын
My issue is resolved now after using below steps: Right click(on the Listeners class from ProjectExplorer ) -> go to source-> click on overide/implement methods -> select the check boxes for the ITest listener (make sure all check box inside it should be checked )->click on oK. That's it !!! :)
@RaghavPal
@RaghavPal 4 жыл бұрын
So happy to know you resolved it
@arpitaslittleworld
@arpitaslittleworld 3 жыл бұрын
@@nistan5404 thanks a lot for posting the solution here.. i was actually in search of this.. much appreciated.
@zahidullaghouri4532
@zahidullaghouri4532 3 жыл бұрын
@@nistan5404 thanks brother... was searching it from an hour you solved my problem
@TheSoleNemesis
@TheSoleNemesis 2 жыл бұрын
@@nistan5404 Brilliant. I had the same issue twice but after reading your comment I was able to resolve the issue as well. Thank you so much!
@surajsurya1414
@surajsurya1414 4 жыл бұрын
Hi Raghav, I followed your video to 14.30 but statement from listener is not printed in Console. Please see my code and result below and let me know what I am missing here. Thank You, --------------------------------- package listeners; import org.testng.ITestContext; import org.testng.ITestNGListener; import org.testng.ITestResult; public class TestNGListeners implements ITestNGListener{ public void onTestStart(ITestResult result) { System.out.println("********* Test started :" +result.getName()); } public void onTestSuccess(ITestResult result) { System.out.println("********* Test is successful :" +result.getName()); } public void onTestFailure(ITestResult result) { System.out.println("********* Test failed :" +result.getName()); } public void onTestSkipped(ITestResult result) { System.out.println("********* Test skipped :" +result.getName()); } public void onTestFailedButWithinSuccessPercentage(ITestResult result) { } public void onStart(ITestContext context){ } public void onFinish(ITestContext context){ System.out.println("********* Tests finish :" +context.getName()); } } --------------------------------- package listeners; import static org.testng.Assert.assertTrue; import org.testng.Assert; import org.testng.annotations.Listeners; import org.testng.annotations.Test; @Listeners(listeners.TestNGListeners.class) public class TestNGListenerDemo { @Test public void test1() { System.out.println("I am inside test1."); } @Test public void test2() { System.out.println("I am inside test2."); //Assert.assertTrue(false); } @Test public void test3() { System.out.println("I am inside test3."); } } --------------------------------- Console. [RemoteTestNG] detected TestNG version 7.0.1 I am inside test1. I am inside test2. I am inside test3. PASSED: test1 PASSED: test2 PASSED: test3 =============================================== Default test Tests run: 3, Failures: 0, Skips: 0 =============================================== =============================================== Default suite Total tests run: 3, Passes: 3, Failures: 0, Skips: 0 ===============================================
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Suraj, I will have to check the setup for this. Just re-check with all the steps
@surajsurya1414
@surajsurya1414 4 жыл бұрын
@@RaghavPal Hi Raghav, Just to let you know I find some typo mistake in my code. My problem is solved now. Thank you for your quick response. You are great.
@ilavarasansriraman4140
@ilavarasansriraman4140 3 жыл бұрын
Sir... For Assertion, you are importing junit package instead of TestNG package
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Ilavarasan, where exactly, pls mention the time stamp, I will correct it
@ilavarasansriraman4140
@ilavarasansriraman4140 3 жыл бұрын
@@RaghavPal time => 14:50
@RaghavPal
@RaghavPal 3 жыл бұрын
Okay, I cannot update the existing video but will take care for next one
@ilavarasansriraman4140
@ilavarasansriraman4140 3 жыл бұрын
@@RaghavPal okay sir
@ganeshswami7909
@ganeshswami7909 4 жыл бұрын
Hii sir, When i am trying this code on my System. He takes only "ITestListener" and import that..but He not Showing any kind of error at Class Name. ( I mean Can't add unimplemented methods). So for that what will i do.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Ganesh, sorry for late reply. Will need to check more details on this
@ganeshswami7909
@ganeshswami7909 4 жыл бұрын
@@RaghavPal Thank You sir, & Sir, Now Solve this Issue. and I am Watching Your Videos on Cucumber BDD Framework. 👍👍
@JRYES
@JRYES 4 жыл бұрын
Hi Raghav, how can I add listeners to my extent report ?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Jerome, just check this article may help - www.seleniumeasy.com/selenium-tutorials/extent-reports-using-testng-listeners
@786Muhaimin
@786Muhaimin 4 жыл бұрын
I don't know why, but when I don't get the error to add the unimplemented methods, I've configured my framework properly with TestNG, any suggestions?
@RaghavPal
@RaghavPal 4 жыл бұрын
You can try to restart Eclipse and check
@kshipra4504
@kshipra4504 2 жыл бұрын
@@RaghavPal I am also facing this same issue. Even, restarting did not help.
@abhinavanand4076
@abhinavanand4076 6 жыл бұрын
Hello sir plz help to know which is the best certification for jmeter or make a video for which certification is good for fresher QA. Plz plz Sir
@RaghavPal
@RaghavPal 6 жыл бұрын
Abhinav, do not post the same comment on different videos. I can see all the comments from different videos at once. So this is just duplicate for me. As i told earlier for JMeter as of now there is VSkills certification and it is enough. It's a open source tool and so we do not have a specific certification from any org/body for it. I will make a video on it as well
@abhinavanand4076
@abhinavanand4076 6 жыл бұрын
Automation Step by Step - Raghav Pal Thank u sir and i am sorry sir for duplicate comments, i did't get any comment regarding Vskills so i do this, i m really sorry for this behaviour 😔😔😔😔
@RaghavPal
@RaghavPal 6 жыл бұрын
Thats okay Abhinav, just wanted to let you know as I was getting too many duplicate comments. And I will soon create a video where I will explain this. It will help others too.
@arunachalamp1683
@arunachalamp1683 3 жыл бұрын
Bro Small help I'm going to learn selenium web driver with java current generation its okay or could you suggest me any language and I'm learn through institute waiting for your reply
@RaghavPal
@RaghavPal 3 жыл бұрын
You can learn from this or any online tutorials and Java is good to start with
@arunachalamp1683
@arunachalamp1683 3 жыл бұрын
@@RaghavPal Thank you bro
@kevinsantillan8518
@kevinsantillan8518 4 жыл бұрын
Hello raghav, can I add listeners to each cases in the switch statements? (I am using a keyword framework) If that is possible, how can I add those? thanks
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Kevin, I did not completely got you. What exactly is the scenario and what do you want to achieve
@kevinsantillan8518
@kevinsantillan8518 4 жыл бұрын
@@RaghavPal Hi Raghav. I have created a test method with switch statements (it has multiple cases) and those cases are called by an excel file using the keywords inside the file. So can I add the listeners to the multiple cases of that switch statement?
@RaghavPal
@RaghavPal 4 жыл бұрын
You can as per your need Kevin
@shardasstudio6505
@shardasstudio6505 5 жыл бұрын
hi sir, m facing below error while running testng suite file.
@RaghavPal
@RaghavPal 5 жыл бұрын
What is the error Shardha
@shardasstudio6505
@shardasstudio6505 5 жыл бұрын
Hi Sir, i have created testng suite, when i run this testng suite , m facing below error. [RemoteTestNG] detected TestNG version 6.14.2 org.testng.TestNGException: Listener listener.TestNGListener was not found in project's classpath at org.testng.TestNG.addListeners(TestNG.java:946) at org.testng.TestNG.initializeConfiguration(TestNG.java:912) at org.testng.TestNG.initializeEverything(TestNG.java:996) at org.testng.remote.support.RemoteTestNG6_12.initialize(RemoteTestNG6_12.java:22) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
@RaghavPal
@RaghavPal 5 жыл бұрын
Looks like name is incorrect. Pls check this stackoverflow.com/questions/33875603/testng-listener-was-not-found
@nistan5404
@nistan5404 4 жыл бұрын
Hi Raghav Sir, Can we use listeners in cucumber framework project just like TestNG?? I have one test case with 3 scenarios in cucumber project. and if two scenario failed then I want two different .png files in my screenshot folder.I m able to get one png file with hooks in Screenshot folder without using listener in below example But what to do if two scenario failed. e.g @After public void teardown(Scenario scenario) throws IOException { System.out.println("close browser"); if (scenario.isFailed()) { File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(scrFile, new File("D:\\EclipseProjectWorkspace\\FBuzzSuite_Cucumber\\Screenshots\\Test.png")); } driver.close(); }
@RaghavPal
@RaghavPal 4 жыл бұрын
Yes, you can use. You can also check hooks cucumber.io/docs/cucumber/api/#hooks
@Deniz-ss1sv
@Deniz-ss1sv 3 жыл бұрын
:)
Selenium Framework for Beginners 21 | Selenium TestNG | How to set Priority
8:16
Automation Step by Step
Рет қаралды 15 М.
P25 - TestNG Listeners | TestNG | Testing Framework | ITestListener |
55:35
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 47 МЛН
The Joker saves Harley Quinn from drowning!#joker  #shorts
00:34
Untitled Joker
Рет қаралды 66 МЛН
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 17 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Taking ScreenShot ONLY for Failed Tests in Selenium using TestNG Listener
32:12
Naveen AutomationLabs
Рет қаралды 117 М.
Selenium Framework for Beginners 35 | How to run Selenium tests on SauceLabs
20:25
Automation Step by Step
Рет қаралды 34 М.
IntelliJ IDEA Beginner Tutorial | How to use TestNG
22:59
Automation Step by Step
Рет қаралды 68 М.
GITLAB CI CD FULL COURSE IN 3 HOURS  | Gitlab CI CD From Zero To Hero
2:55:37
TestNG Tutorial #16 - How to Capture Screenshot for Failed Tests in TestNG
18:22
Software Testing Mentor
Рет қаралды 30 М.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 47 МЛН