Hello. How can I get auto suggest umimplement methods After I typed implements ITestListeners Interface.
@ankitchoudhary93 жыл бұрын
As always sir "the best explanation one can get"
@RaghavPal3 жыл бұрын
Thanks a lot Ankit
@lavbhatt65123 жыл бұрын
sir you are great you have explained it so well and in such an easy manner , big thanks from my side :)
@RaghavPal3 жыл бұрын
You are most welcome Lav
@vaishalilahudkar27952 жыл бұрын
Its a very useful.Thanks
@RaghavPal2 жыл бұрын
Most welcome Vaishali
@sipun123rocks4 жыл бұрын
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.
@RaghavPal4 жыл бұрын
I will try to do that Jayaprakash
@srija_sk2 жыл бұрын
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?
@RaghavPal2 жыл бұрын
Hi, will need to check the logs and troubleshoot
@muzisadventure76603 жыл бұрын
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.
@RaghavPal3 жыл бұрын
Just check if all the required dependencies are added in pom.xml
@srivenkatanathann16303 жыл бұрын
Hi Raghav, I am also not able to get all the unimplemented methods by default, what to do?
@RaghavPal3 жыл бұрын
will need to see if you have added the required lib and did the setup properly
@nedhishetty13153 жыл бұрын
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..
@RaghavPal3 жыл бұрын
Hi Nedhi, check this can help stackoverflow.com/questions/20715802/how-do-i-get-a-testng-report-to-show-console-output
@FazSaber5 жыл бұрын
Would you use listeners with Extent reporter? So if a test fails, you can say take a screenshot to add to the report?
@RaghavPal5 жыл бұрын
Yes that is very much practiced Paul
@NishantRanjan28112 жыл бұрын
You are a Gem. I really appreciate all the work you are doing. Thank you so much.
@RaghavPal2 жыл бұрын
You are so welcome Nishant
@yogisingh1704 жыл бұрын
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
@RaghavPal4 жыл бұрын
Hi Yogi, this should help - stackoverflow.com/questions/49339698/org-testng-testngexception-sun-security-provider-certpath-suncertpathbuilderexc
@maharaj923 жыл бұрын
Not able to use groups if listeners is getting usedIt throwing error
@RaghavPal3 жыл бұрын
Hi Aniket, will need to check on this
@nistan54044 жыл бұрын
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 { }
@nistan54044 жыл бұрын
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 !!! :)
@RaghavPal4 жыл бұрын
So happy to know you resolved it
@arpitaslittleworld3 жыл бұрын
@@nistan5404 thanks a lot for posting the solution here.. i was actually in search of this.. much appreciated.
@zahidullaghouri45323 жыл бұрын
@@nistan5404 thanks brother... was searching it from an hour you solved my problem
@TheSoleNemesis2 жыл бұрын
@@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!
@surajsurya14144 жыл бұрын
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 ===============================================
@RaghavPal4 жыл бұрын
Hi Suraj, I will have to check the setup for this. Just re-check with all the steps
@surajsurya14144 жыл бұрын
@@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.
@ilavarasansriraman41403 жыл бұрын
Sir... For Assertion, you are importing junit package instead of TestNG package
@RaghavPal3 жыл бұрын
Hi Ilavarasan, where exactly, pls mention the time stamp, I will correct it
@ilavarasansriraman41403 жыл бұрын
@@RaghavPal time => 14:50
@RaghavPal3 жыл бұрын
Okay, I cannot update the existing video but will take care for next one
@ilavarasansriraman41403 жыл бұрын
@@RaghavPal okay sir
@ganeshswami79094 жыл бұрын
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.
@RaghavPal4 жыл бұрын
Hi Ganesh, sorry for late reply. Will need to check more details on this
@ganeshswami79094 жыл бұрын
@@RaghavPal Thank You sir, & Sir, Now Solve this Issue. and I am Watching Your Videos on Cucumber BDD Framework. 👍👍
@JRYES4 жыл бұрын
Hi Raghav, how can I add listeners to my extent report ?
@RaghavPal4 жыл бұрын
Hi Jerome, just check this article may help - www.seleniumeasy.com/selenium-tutorials/extent-reports-using-testng-listeners
@786Muhaimin4 жыл бұрын
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?
@RaghavPal4 жыл бұрын
You can try to restart Eclipse and check
@kshipra45042 жыл бұрын
@@RaghavPal I am also facing this same issue. Even, restarting did not help.
@abhinavanand40766 жыл бұрын
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
@RaghavPal6 жыл бұрын
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
@abhinavanand40766 жыл бұрын
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 😔😔😔😔
@RaghavPal6 жыл бұрын
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.
@arunachalamp16833 жыл бұрын
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
@RaghavPal3 жыл бұрын
You can learn from this or any online tutorials and Java is good to start with
@arunachalamp16833 жыл бұрын
@@RaghavPal Thank you bro
@kevinsantillan85184 жыл бұрын
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
@RaghavPal4 жыл бұрын
Hi Kevin, I did not completely got you. What exactly is the scenario and what do you want to achieve
@kevinsantillan85184 жыл бұрын
@@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?
@RaghavPal4 жыл бұрын
You can as per your need Kevin
@shardasstudio65055 жыл бұрын
hi sir, m facing below error while running testng suite file.
@RaghavPal5 жыл бұрын
What is the error Shardha
@shardasstudio65055 жыл бұрын
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)
@RaghavPal5 жыл бұрын
Looks like name is incorrect. Pls check this stackoverflow.com/questions/33875603/testng-listener-was-not-found
@nistan54044 жыл бұрын
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(); }
@RaghavPal4 жыл бұрын
Yes, you can use. You can also check hooks cucumber.io/docs/cucumber/api/#hooks