i dont know you... but i am a biggest fan of yours.. i am watching everyday..hats off sir.. i wish i could learn from you directly..
@Mukeshotwani8 жыл бұрын
Hey Sandeep you made my day. Feel free to contact in case any help required from my side.
@vedavathi58137 жыл бұрын
Hi Mukesh its really a fantastic job you are doing..Now am spending my time in watching your videos I really fell in Love and found curiosity in learning selenium,Its actually boosting my career too Thanks and God bless you:)
@Mukeshotwani7 жыл бұрын
Hey Veda thank a ton. Your comment made my day. Keep learning and let me know if you need any help from my side.
@pankajsutar9198 жыл бұрын
nice explanation sir... i have faced this question in my one of the interview thanks.
@Mukeshotwani8 жыл бұрын
Thanks
@kiranbanda69788 жыл бұрын
I am looking for this option. It was great help to me. Awesome explanation .. Thank you Mukesh
@Mukeshotwani8 жыл бұрын
Hey Kiran I am glad to know that you find it useful. Let me know if any help from my side.
@nithyasrinivasn98297 жыл бұрын
Very clear explanation.Easy to follow.Thanks
@Mukeshotwani7 жыл бұрын
Thanks Nithya. Keep visiting.
@rupeshpatil40678 жыл бұрын
Hello Mukesh.... Awesome explanation...... Thank you Mukesh
@Mukeshotwani8 жыл бұрын
Welcome Rupesh Hope it helped.
@yashsaxena475 жыл бұрын
Awesome mukesh bhai :) Thanks for the video !! Keep sharing
@Mukeshotwani5 жыл бұрын
Thanks Yash 🤗
@girijaprasannadas84487 жыл бұрын
Hi Mukesh. Thanks for this awesome video. Very much Thankful to you for the second example.
@Mukeshotwani7 жыл бұрын
Welcome Girija. Keep learning
@heenagandhi76508 жыл бұрын
I am a big fan of your... You are too good dude
@Mukeshotwani8 жыл бұрын
+Heena Gandhi thanks Heena :) your comment made me happy. Let me know if any help required in Selenium Happy long weekend.
@GoUpstairs6 жыл бұрын
This is great! U are a great teacher! Thanks!
@Mukeshotwani6 жыл бұрын
Thank you 🙏 Rial
@aviscreativity21754 жыл бұрын
Thank you Sir for your kind information related to this.....
@Mukeshotwani4 жыл бұрын
Most welcome Abhinash
@ganeshkamath6035 жыл бұрын
Hi Mukesh, I have been working on selenium from few days now. I am a beginner in selenium. Thanks a lot for all the videos you have uploaded on selenium. helped me a lot. If possible please help me with below : 1. How can we check actual vs expected results through selenium? 2. I create test cases and execute on my system. How can i share it with the team and then they test it on their system? Do they have to install eclipse? is there any way to just use the jar file or something and run the test case in multiple tester systems? Thanks, Ganesh
@samshoaib68716 жыл бұрын
Hi Mukesh, Whats the difference between this and iRetry Analyzer?
@harmanmaan8706 жыл бұрын
Hi Mukesh , nice explanation , thanks
@Mukeshotwani6 жыл бұрын
Thanks Harman
@veera1192 жыл бұрын
Thanks. Really useful Mukesh.
@gauravgoyal16467 жыл бұрын
Hi mukesh in which video tutorial you used ItestResults....
@creativemind46085 ай бұрын
Thanks a lot, Great help.
@Mukeshotwani5 ай бұрын
Thanks
@farheenahmad24787 жыл бұрын
Hey Mukesh, thanks for such amazing explanation, i have one question, which is the special feature of List you are using which is not in Array List?
@Mukeshotwani7 жыл бұрын
Hi Farheen, Arraylist has all feature of List too. Since Selenium returns List so we have to accept as list only.
@nagulmeerashaik33368 жыл бұрын
Hi Mukesh Frist of all deeply Thanking you so much to uploaded this type useful videos, I learned a lot from your videos. I faced some interviews a few days back still I'm searching for Automation job but when I faced in interview on java concepts most off Interviewer asking on java I would like to know where we use Method overloading and Method overriding concepts in selenium during writing scripts
@Mukeshotwani8 жыл бұрын
Overloading we used in iFrame topics and Overridding used in Listener learn-automation.com/handle-frames-in-selenium/ learn-automation.com/what-is-testng-listener-and-how-to-implement-in-selenium/ learn-automation.com/what-is-listeners-in-selenium-webdriver/
@nagulmeerashaik33367 жыл бұрын
Thanks Mukesh.
@sheikhlatif53347 жыл бұрын
Thanks a lot dear for your great effort.
@vilaskhandare81005 жыл бұрын
Thanks sir for such nice video. I want to know in second scenario is it nessesary to use main method ? Or can we use testNg annotation instead?
@Mukeshotwani5 жыл бұрын
Hi Vilas, in order to use this feature you have to use TestNG only.
@abhiatYT4 жыл бұрын
Can't we do via IRetryAnalyzer ? Which approach is recommended ?
@Yaddalapudi5 жыл бұрын
15:55 you are running the failed test but its again failed right ?
@Mukeshotwani5 жыл бұрын
Yes Krishna because we havent fixed the script. Once you get failed test you have to fix it and then run the test again.
@sunnylodh88042 жыл бұрын
Hi Mukesh, if there 100 of methods that are failing, then every time I have to give path for 100 of my methods in the array list?
@vedavathi58137 жыл бұрын
Hi Mukesh, Thankyou so much for sharing your knowledge with us..May I know how to capture screenshot for failed tests using TestNG listners. Thanks in advance.
@Mukeshotwani7 жыл бұрын
Hi Veda, Here is the sample code for the Listener learn-automation.com/what-is-listeners-in-selenium-webdriver/
@antoraja5786 жыл бұрын
Hi Mukesh, you have executed the failed test case initially, so again one folder gets created, so everytime if you run a failed test case then a new folder will get created every time?
@Bell4Fun6 жыл бұрын
No , butyou have to follow the same steps as mention during the execution, and it will ask to replace the existing *.xml and html say yes if you want to over write else no and hence you utilize the existing path.I hope it helps
@sandeepreddy60988 жыл бұрын
Hi mukesh, I like the above topic but has simple question.If one test case hs been failed an d it depends on other test case then at that how can re execute the failed test case without opening browser
@Abhilash_TC6 жыл бұрын
Use IRetryAnalyzer which is more effective and structured...
@mdafsarali52648 жыл бұрын
Hi Mukesh , It really helped me a lot. Thank you for all your efforts. I have a question like if I have to run multiple XML files using runner then how can I get the testNG results within one report. As we know one XML file have one suite. but in my case I want multiple XML file to run within one suite..please suggest me. Thanks
@HArjoC4 жыл бұрын
I have one question, When the failed test cases are stored in failed xml folder. Can we trigger this in a script where we dont have to run manually from the tester runner page?
@Mukeshotwani4 жыл бұрын
Yes Harjo, why not you can run testng.failed.xml from script as well.
@cashedge17 жыл бұрын
if I add this runner class to my framework and just execute my test cases in normal way then all failed test cases will be rerun ? how testng will know I have to run this class post test execution ?
@slrumon8 жыл бұрын
thanks vai.I will never get bored of watching ur video. how can I do the same thing with JUnit???
@Mukeshotwani8 жыл бұрын
Hey Khaled thanks mate :) For junit I am not sure because I have not worked on Junit much... I can give a try and will let u know soon.
@slrumon8 жыл бұрын
thanks for reply. i found it for junit. let me know if u have anything about allure reporting.
@Mukeshotwani8 жыл бұрын
Hi Khaled I have not used Allure reporting. You can try with extent report
@sanketdarekar81523 жыл бұрын
will it run the testcases after this assert code testcase??
@Mukeshotwani3 жыл бұрын
Hi Sanket, Sorry I did not get your question. Can you brief more about it?
@nityaranjan85545 жыл бұрын
Hi Mukesh, Just a doubt for this approach. By running this TestRunner class we can't get the class names which are failed. we just found in console output that 1 TC is failed. So how can we know which TC is failed. Can you explain this.
@Mukeshotwani5 жыл бұрын
Hi Nitya when you open failed-testcase.xml file you will get all details about class and methods
@swanandmahurkar70825 жыл бұрын
What about skipped testcases ? what if i want to run skipped and failed testcases together ? please reply
@Mukeshotwani5 жыл бұрын
HI Swanand skipped and failed both can be executed with same xml file.
@growautomation11145 жыл бұрын
Thank you so much.... To give reply
@Mukeshotwani5 жыл бұрын
Most welcome Sachin
@Bell4Fun6 жыл бұрын
can t we execute Testng .xml instead also observed that now no need to put double slash in the path for testng.xml in the example
@srinivastrully37897 жыл бұрын
Hi Mukesh, How to Trigger TestRunner class programatically And that too Only When there are failed Test cases ?
@rahilkumar35586 жыл бұрын
When this Code will execute if any testscript fail? means on what conditions it will run and for how many times it will run?
@devopslab-livescenarios13026 жыл бұрын
Thanks Mukesh! I have a doubt Like 1 out of 3 TCs is failing initially, so 1 testng-failed.xml file gets created. i did correction in my the failed test case(which is correct now - i.e - i wrote Assert.assertTrue(true) - pass condition) i did refresh the package an created a Test-Runner class and run that class. now it should show me the "Total tests run: 1, Pass: 1, Skips: 0" but its showing "Total tests run: 1, Failures: 1, Skips: 0" is this the correct behavior, Yes/No - Kindly explain?
@Mukeshotwani6 жыл бұрын
Hi Minaxi, Ideally, this should show "Total tests run: 1, Pass: 1, Skips: 0" after correction Please rerun the test all should pass
@yashuy3279 Жыл бұрын
Thank you 😊
@Mukeshotwani Жыл бұрын
You're welcome 😊
@divyakumar34887 жыл бұрын
How to build only failed test cases in jenkins? Example i have 200 test cases and 25 has failed. so how to build only failed test case?
@ankitsagar90364 жыл бұрын
hello sir, I am not getting test folder afer refreshing my test folder (html file), can you help me regarding this
@prasannakulkarni33508 жыл бұрын
hi mukesh I wanted to know that from a list of test cases, for eg: 100 test cases are there among them i want to run first 10 an then last 20 test cases .....how can we do it , please explain...?
@Mukeshotwani8 жыл бұрын
You can use Group feature in this case.
@Exam998396 жыл бұрын
i handle 50 test case but the 25 case only failed other case need for run so how to write code
@Mukeshotwani6 жыл бұрын
HI Karthi, you have to fix the failed test cases and run the tesng-failed.xml file
@srikanthy68446 жыл бұрын
what is threadpoolsize in selenium ???
@growautomation11145 жыл бұрын
hi mukesh please make video for this how to test from 25 to 35 testcases out of 100 testcases i selenium
@Mukeshotwani5 жыл бұрын
Hi Sachin, You can mention all test in xml and you can run
@sandeepnagireddy72068 жыл бұрын
hi mukesh i have one doubt?how to generate testng.xml file automatically? ididnt find the option "convert testng"could you guide me please?
@Mukeshotwani8 жыл бұрын
+Sandeep Nagireddy hi Sandeep you have to add testng plugin in eclipse then only testng options will come. You can download testng from market place
@shreyasbs28617 жыл бұрын
Awesome ...Excellent info
@nekkantivenkateswararao13864 жыл бұрын
Sir y we r using main method in testng,in testng annotations will be plays major role na sir
@Mukeshotwani4 жыл бұрын
Yes, correct but this requirement is different. If you want to run failed test cases (using testng-failed.xml)manually then you dont need any main method. If you want to trigger the xml automatically ten you can use main method or @Test to run the xml file.
@jithendarchowdhary51324 жыл бұрын
@@Mukeshotwani Hi Sir I want to implement these at my framework level where I need to call these method either aftersuite or at listener please can you tell me
@sweetchakri8 жыл бұрын
How do you trigger this script in an Automation Framework using Selenium Webdriver and testNG ??
@Mukeshotwani8 жыл бұрын
In framework you can use Listeners to re run test cases.
@sezeenmehjabeen25264 жыл бұрын
Hi Sir, how can we execute failed test case for JUnit?
@Mukeshotwani4 жыл бұрын
Hello Sezeen, you can do using TestRule junit.org/junit4/javadoc/4.12/org/junit/rules/TestRule.html
@ankitsaxenamusic8 жыл бұрын
Hi Mukesh, I have a query here. Suppose I execute my nightly builds and check the status the next day. Now the first test case has failed due to which my whole build got failed. In that case how will you trigger this logic? Since you have manually ran your runner class. Is it possible to execute the runner class as soon as the test case failed. In that case I guess IRetryAnalyser will come into picture. Kindly suggest if I'm going in the right direction. Thanks Ankit
@Mukeshotwani8 жыл бұрын
Hi Ankit yes in running via Jenkins then IRetryAnalyser will help.
@ankitsaxenamusic8 жыл бұрын
Thanks a lot mukesh for your quick response. Another question that came into my mind that the restriction in using IRetryAnalyser is that every class may needs to implement this. So if i am having 100 classes then everytime i would need to write the code logic in order to run the failed tests in each class. Wouldn't the code be reduntant then. What could be the solution for this? Pls correct me if i'm going in wrong direction. And thanks a lot for ur efforts in putting up such great videos.
@Mukeshotwani8 жыл бұрын
+ANKIT SAXENA Hi Ankit no you can keep in testng.xml file so it will take care of all this..
@ankitsaxenamusic8 жыл бұрын
+Mukesh otwani mmmm can you pls post a very small snippet. i got your point though but snippet would b very helpful if you can.. thanku so much Mukesh :-)
@Mukeshotwani8 жыл бұрын
+ANKIT SAXENA will upload soon
@priyasai9358 жыл бұрын
Hi Mukesh, thanks for your great work! I'm a new comer to Selenium. I installed Java, Eclipse and added selenium jar files. I tried to write my first program using webdriver for IE browser (as this is only browser at my work) I downloaded IE driverserver.exe and added a code for System.setproperty etc.. but when i wrote 'Web Driver driver = new InternetExplorerDriver();' I'm not seeing 'Import InternetExplorerDriver from the down yellow box.. and also not seeing 'Import Webdriver' too. so i cannot import 'Webdriver' and 'InternetExplorerDriver'. Under the package name, i manually tried to write 'import org.openqa.Selenium WebDriver' also, but it is not recognizing and shows red cross mark.. Why is it happening? what could be the problem? can you pls help me..
@Mukeshotwani8 жыл бұрын
Hi Anuradha have you downloaded Selenium 3 beta or any other jar.. You can download Selenium 3 server from below location docs.seleniumhq.org/download/
@tejpanja6973 жыл бұрын
Hi Mukesh, please close all the unwanted tabs in Eclipse while explaining.
@sureshdas31875 жыл бұрын
Then how to send the report of pass and mail through mail using selenium in pictorial format?
@Mukeshotwani5 жыл бұрын
HI Suresh, You can do this in 2 ways 1- Using Jenkins email plugins kzbin.info/www/bejne/sHjIfWisf9N4apI 2-Using Java Library kzbin.info/www/bejne/p3jUan5uatJ6r6M
@shreedeevi28002 жыл бұрын
How to differentiate failed ans passed testcases without reports
@Mukeshotwani2 жыл бұрын
You can get this information in console.
@rajeevbhaskar78145 жыл бұрын
How to do it in Nunit?
@sadhvia15398 жыл бұрын
Hi, I am getting the below error while executing TestRunner class... Exception in thread "main" java.lang.NoClassDefFoundError: org/testng/TestNG at com.testng.TestRunner1.main(TestRunner1.java:12) Caused by: java.lang.ClassNotFoundException: org.testng.TestNG at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more
@Mukeshotwani8 жыл бұрын
Kindly run testng-failed.xml file
@sadhvia15398 жыл бұрын
It is working fine when run testng-failed.xml directly. But when create TestRunner class to run testng-failed.xml. It is giving the above error.. Please suggest what to do... Please find my TestRunner code below. import java.util.ArrayList; import java.util.List; import org.testng.TestNG; public class TestRunner1 { public static void main(String[] args) { TestNG test = new TestNG(); List list = new ArrayList(); list.add("D:\\Selenium\\PractiseWorkSpace\\WebdriverProject\\test-output\\Sanity testing\\testng-failed.xml"); test.setTestSuites(list); test.run(); } }
@ABHI007ism8 жыл бұрын
Hi Mukesh, Thanks for the video! In the video at 16.10 you mentioned that code will check if TestNG-failed.xml file is present or NOT but IT IS NOT CHECKING. Observed below error when I ran the code using TestNG ITestListener :- [TestNG] [ERROR] No test suite found. Nothing to run java.io.FileNotFoundException: D:\Java\Eclipse_java\TestNGFailedProject\test-output\TestNGFailed\testng-failed.xml (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at java.io.FileInputStream.(Unknown Source) at org.testng.xml.Parser.parse(Parser.java:163) at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311) at org.testng.TestNG.run(TestNG.java:1030) at TestNGFailedRunner.Runner.TestNGFailedRunnerscript(Runner.java:24) at Listeners.TestNGListeners.onFinish(TestNGListeners.java:14) at org.testng.TestRunner.fireEvent(TestRunner.java:1241) at org.testng.TestRunner.afterRun(TestRunner.java:1032) at org.testng.TestRunner.run(TestRunner.java:621) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175) Usage: [options] The XML suite files to run Thanks
@Mukeshotwani8 жыл бұрын
is it fixed?
@asupriya12175 жыл бұрын
really helpful
@Mukeshotwani5 жыл бұрын
Thanks Supriya
@shankumondal28815 жыл бұрын
Awesome!
@Mukeshotwani5 жыл бұрын
Thank you Shanku
@deepikac22508 жыл бұрын
Superb Explanation. I just tried to run failed test scripts as you shown in the video. But I am facing below error: [TestNG] [ERROR] No test suite found. Nothing to run Usage: [options] The XML suite files to run Options: -configfailurepolicy Configuration failure policy (skip or continue) -d Output directory -dataproviderthreadcount Number of threads to use when running data providers -excludegroups Comma-separated list of group names to exclude -groups Comma-separated list of group names to be run -junit JUnit mode Default: false -listener List of .class files or list of class names implementing ITestListener or ISuiteListener -methods Comma separated of test methods Default: [] -methodselectors List of .class files or list of class names implementing IMethodSelector -mixed Mixed mode - autodetect the type of current test and run it with appropriate runner Default: false -objectfactory List of .class files or list of class names implementing ITestRunnerFactory -parallel Parallel mode (methods, tests or classes) Possible Values: [tests, methods, classes, instances, none, true, false] -port The port -reporter Extended configuration for custom report listener -suitename Default name of test suite, if not specified in suite definition file or source code -suitethreadpoolsize Size of the thread pool to use to run suites Default: 1 -testclass The list of test classes -testjar A jar file containing the tests -testname Default name of test, if not specified in suitedefinition file or source code -testnames The list of test names to run -testrunfactory, -testRunFactory The factory used to create tests -threadcount Number of threads to use when running tests in parallel -usedefaultlisteners Whether to use the default listeners Default: true -log, -verbose Level of verbosity -xmlpathinjar The full path to the xml file inside the jar file (only valid if -testjar was specified) Default: testng.xml Could you please let me know how to fix it.
@Mukeshotwani8 жыл бұрын
Hey Deepika this error comes when no xml to run. It means all test are passed or no xml generated.
@deepikac22508 жыл бұрын
Thanks mukesh for your reply. I have failed xml file which is generated under test-output folder and I given correct path as well.
@deepikac22508 жыл бұрын
I got know the resolution. I had written 'runner.setTestNames(lst);' instead of 'runner.setTestSuites(lst); ' thats why It was not running. Now my script is running fine. Thanks a lot for providing such a helpful videos.
@amitdhanke40137 жыл бұрын
fabulous :)
@Mukeshotwani7 жыл бұрын
Thanks AMit
@svpglb4 жыл бұрын
i am very sorry to say this but information given here is wrong. We have listeners in testng which we have to use not this way. Please update your video might give wrong information to beginners.
@Mukeshotwani4 жыл бұрын
Hi Srikant we have different ways to execute failed test cases in testng. We have listeners too but how can you say this information is wrong. Can you explain here?
@prasannakulkarni33508 жыл бұрын
super video
@Mukeshotwani8 жыл бұрын
Thanks Prasanna
@aravindreddyalla76177 жыл бұрын
Then how to execute single testcase 10000 times???
@Mukeshotwani7 жыл бұрын
Hi Alla, This is the code Below code will run 5 times @Test(invocationCount=5) public void test1() { System.out.println("Hello"); System.out.println(Thread.currentThread().getId()); }
@dorg998 жыл бұрын
code: TestNG = new TestNG(); List=new ArrayList(); list.add("C:\Workspace\project_name\test_output\Test_suite_name\tenstng-failed.xml"); runner.setTestSuits(list); runner.run();
@Mukeshotwani8 жыл бұрын
Hi Dror what is issue here?
@dorg998 жыл бұрын
No issue. I didn't see the code from the video, so wrote it here in case people want to copy it :)