How to execute failed test cases in Selenium webdriver

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2024

ความคิดเห็น • 133

  • @sandeepnagireddy7206
    @sandeepnagireddy7206 8 ปีที่แล้ว

    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..

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hey Sandeep you made my day. Feel free to contact in case any help required from my side.

  • @vedavathi5813
    @vedavathi5813 7 ปีที่แล้ว +2

    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:)

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Hey Veda thank a ton. Your comment made my day. Keep learning and let me know if you need any help from my side.

  • @pankajsutar919
    @pankajsutar919 7 ปีที่แล้ว +2

    nice explanation sir...
    i have faced this question in my one of the interview
    thanks.

  • @kiranbanda6978
    @kiranbanda6978 8 ปีที่แล้ว

    I am looking for this option. It was great help to me. Awesome explanation .. Thank you Mukesh

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hey Kiran I am glad to know that you find it useful. Let me know if any help from my side.

  • @nithyasrinivasn9829
    @nithyasrinivasn9829 7 ปีที่แล้ว +1

    Very clear explanation.Easy to follow.Thanks

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Thanks Nithya. Keep visiting.

  • @ganeshkamath603
    @ganeshkamath603 5 ปีที่แล้ว +1

    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

  • @girijaprasannadas8448
    @girijaprasannadas8448 7 ปีที่แล้ว +1

    Hi Mukesh. Thanks for this awesome video. Very much Thankful to you for the second example.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Welcome Girija. Keep learning

  • @mdafsarali5264
    @mdafsarali5264 8 ปีที่แล้ว

    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

  • @rupeshpatil4067
    @rupeshpatil4067 8 ปีที่แล้ว

    Hello Mukesh....
    Awesome explanation......
    Thank you Mukesh

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Welcome Rupesh Hope it helped.

  • @heenagandhi7650
    @heenagandhi7650 8 ปีที่แล้ว

    I am a big fan of your... You are too good dude

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Heena Gandhi thanks Heena :) your comment made me happy.
      Let me know if any help required in Selenium
      Happy long weekend.

  • @farheenahmad2478
    @farheenahmad2478 7 ปีที่แล้ว +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว +1

      Hi Farheen, Arraylist has all feature of List too. Since Selenium returns List so we have to accept as list only.

  • @samshoaib6871
    @samshoaib6871 5 ปีที่แล้ว +1

    Hi Mukesh, Whats the difference between this and iRetry Analyzer?

  • @yashsaxena47
    @yashsaxena47 5 ปีที่แล้ว +1

    Awesome mukesh bhai :) Thanks for the video !! Keep sharing

  • @vedavathi5813
    @vedavathi5813 7 ปีที่แล้ว +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Hi Veda,
      Here is the sample code for the Listener learn-automation.com/what-is-listeners-in-selenium-webdriver/

  • @nagulmeerashaik3336
    @nagulmeerashaik3336 7 ปีที่แล้ว +1

    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

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว +1

      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/

    • @nagulmeerashaik3336
      @nagulmeerashaik3336 7 ปีที่แล้ว

      Thanks Mukesh.

  • @aviscreativity2175
    @aviscreativity2175 4 ปีที่แล้ว +2

    Thank you Sir for your kind information related to this.....

  • @GoUpstairs
    @GoUpstairs 6 ปีที่แล้ว +1

    This is great! U are a great teacher! Thanks!

  • @vilaskhandare8100
    @vilaskhandare8100 5 ปีที่แล้ว +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Vilas, in order to use this feature you have to use TestNG only.

  • @creativemind4608
    @creativemind4608 3 หลายเดือนก่อน +1

    Thanks a lot, Great help.

  • @sandeepreddy6098
    @sandeepreddy6098 8 ปีที่แล้ว

    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

  • @veera119
    @veera119 2 ปีที่แล้ว

    Thanks. Really useful Mukesh.

  • @sheikhlatif5334
    @sheikhlatif5334 7 ปีที่แล้ว

    Thanks a lot dear for your great effort.

  • @gauravgoyal1646
    @gauravgoyal1646 7 ปีที่แล้ว

    Hi mukesh in which video tutorial you used ItestResults....

  • @growautomation1114
    @growautomation1114 5 ปีที่แล้ว +2

    Thank you so much.... To give reply

  • @sunnylodh8804
    @sunnylodh8804 2 ปีที่แล้ว

    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?

  • @harmanmaan870
    @harmanmaan870 6 ปีที่แล้ว +1

    Hi Mukesh , nice explanation , thanks

  • @slrumon
    @slrumon 8 ปีที่แล้ว

    thanks vai.I will never get bored of watching ur video. how can I do the same thing with JUnit???

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      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.

    • @slrumon
      @slrumon 8 ปีที่แล้ว +1

      thanks for reply. i found it for junit. let me know if u have anything about allure reporting.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hi Khaled I have not used Allure reporting. You can try with extent report

  • @devopslab-livescenarios1302
    @devopslab-livescenarios1302 6 ปีที่แล้ว +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  6 ปีที่แล้ว

      Hi Minaxi,
      Ideally, this should show "Total tests run: 1, Pass: 1, Skips: 0" after correction
      Please rerun the test all should pass

  • @ABHI007ism
    @ABHI007ism 8 ปีที่แล้ว

    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

  • @srinivastrully3789
    @srinivastrully3789 7 ปีที่แล้ว

    Hi Mukesh, How to Trigger TestRunner class programatically And that too Only When there are failed Test cases ?

  • @priyasai935
    @priyasai935 8 ปีที่แล้ว

    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..

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      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/

  • @abhiatYT
    @abhiatYT 4 ปีที่แล้ว

    Can't we do via IRetryAnalyzer ? Which approach is recommended ?

  • @Abhilash_TC
    @Abhilash_TC 6 ปีที่แล้ว +1

    Use IRetryAnalyzer which is more effective and structured...

  • @prasannakulkarni3350
    @prasannakulkarni3350 8 ปีที่แล้ว

    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...?

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      You can use Group feature in this case.

  • @nityaranjan8554
    @nityaranjan8554 5 ปีที่แล้ว +2

    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.

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Nitya when you open failed-testcase.xml file you will get all details about class and methods

  • @antoraja578
    @antoraja578 6 ปีที่แล้ว +1

    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?

    • @Bell4Fun
      @Bell4Fun 6 ปีที่แล้ว

      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

  • @cashedge1
    @cashedge1 7 ปีที่แล้ว

    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 ?

  • @ankitsaxenamusic
    @ankitsaxenamusic 8 ปีที่แล้ว

    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

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hi Ankit yes in running via Jenkins then IRetryAnalyser will help.

    • @ankitsaxenamusic
      @ankitsaxenamusic 8 ปีที่แล้ว

      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.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +ANKIT SAXENA Hi Ankit no you can keep in testng.xml file so it will take care of all this..

    • @ankitsaxenamusic
      @ankitsaxenamusic 8 ปีที่แล้ว

      +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 :-)

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +ANKIT SAXENA will upload soon

  • @HArjoC
    @HArjoC 4 ปีที่แล้ว +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Yes Harjo, why not you can run testng.failed.xml from script as well.

  • @rahilkumar3558
    @rahilkumar3558 6 ปีที่แล้ว

    When this Code will execute if any testscript fail? means on what conditions it will run and for how many times it will run?

  • @shreyasbs2861
    @shreyasbs2861 6 ปีที่แล้ว

    Awesome ...Excellent info

  • @sandeepnagireddy7206
    @sandeepnagireddy7206 8 ปีที่แล้ว

    hi mukesh i have one doubt?how to generate testng.xml file automatically? ididnt find the option "convert testng"could you guide me please?

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +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

  • @divyakumar3488
    @divyakumar3488 7 ปีที่แล้ว

    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?

  • @deepikac2250
    @deepikac2250 8 ปีที่แล้ว

    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.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hey Deepika this error comes when no xml to run. It means all test are passed or no xml generated.

    • @deepikac2250
      @deepikac2250 8 ปีที่แล้ว

      Thanks mukesh for your reply. I have failed xml file which is generated under test-output folder and I given correct path as well.

    • @deepikac2250
      @deepikac2250 8 ปีที่แล้ว

      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.

  • @Bell4Fun
    @Bell4Fun 6 ปีที่แล้ว

    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

  • @sweetchakri
    @sweetchakri 8 ปีที่แล้ว

    How do you trigger this script in an Automation Framework using Selenium Webdriver and testNG ??

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      In framework you can use Listeners to re run test cases.

  • @growautomation1114
    @growautomation1114 5 ปีที่แล้ว +2

    hi mukesh
    please make video for this
    how to test from 25 to 35 testcases out of 100 testcases i selenium

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว +1

      Hi Sachin,
      You can mention all test in xml and you can run

  • @ankitsagar9036
    @ankitsagar9036 4 ปีที่แล้ว

    hello sir, I am not getting test folder afer refreshing my test folder (html file), can you help me regarding this

  • @tejpanja697
    @tejpanja697 3 ปีที่แล้ว

    Hi Mukesh, please close all the unwanted tabs in Eclipse while explaining.

  • @yashuy3279
    @yashuy3279 ปีที่แล้ว +1

    Thank you 😊

  • @swanandmahurkar7082
    @swanandmahurkar7082 5 ปีที่แล้ว +1

    What about skipped testcases ? what if i want to run skipped and failed testcases together ? please reply

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      HI Swanand skipped and failed both can be executed with same xml file.

  • @sanketdarekar8152
    @sanketdarekar8152 3 ปีที่แล้ว +1

    will it run the testcases after this assert code testcase??

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Sanket, Sorry I did not get your question. Can you brief more about it?

  • @Yaddalapudi
    @Yaddalapudi 4 ปีที่แล้ว +1

    15:55 you are running the failed test but its again failed right ?

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Yes Krishna because we havent fixed the script. Once you get failed test you have to fix it and then run the test again.

  • @sadhvia1539
    @sadhvia1539 8 ปีที่แล้ว

    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

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Kindly run testng-failed.xml file

    • @sadhvia1539
      @sadhvia1539 8 ปีที่แล้ว

      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();
      }
      }

  • @nekkantivenkateswararao1386
    @nekkantivenkateswararao1386 4 ปีที่แล้ว +1

    Sir y we r using main method in testng,in testng annotations will be plays major role na sir

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      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.

    • @jithendarchowdhary5132
      @jithendarchowdhary5132 4 ปีที่แล้ว

      @@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

  • @shankumondal2881
    @shankumondal2881 5 ปีที่แล้ว +1

    Awesome!

  • @asupriya1217
    @asupriya1217 5 ปีที่แล้ว +1

    really helpful

  • @sezeenmehjabeen2526
    @sezeenmehjabeen2526 3 ปีที่แล้ว +1

    Hi Sir, how can we execute failed test case for JUnit?

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hello Sezeen, you can do using TestRule
      junit.org/junit4/javadoc/4.12/org/junit/rules/TestRule.html

  • @Exam99839
    @Exam99839 6 ปีที่แล้ว +1

    i handle 50 test case but the 25 case only failed other case need for run so how to write code

    • @Mukeshotwani
      @Mukeshotwani  6 ปีที่แล้ว

      HI Karthi, you have to fix the failed test cases and run the tesng-failed.xml file

  • @srikanthy6844
    @srikanthy6844 6 ปีที่แล้ว

    what is threadpoolsize in selenium ???

  • @amitdhanke4013
    @amitdhanke4013 7 ปีที่แล้ว +1

    fabulous :)

  • @sureshdas3187
    @sureshdas3187 5 ปีที่แล้ว

    Then how to send the report of pass and mail through mail using selenium in pictorial format?

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      HI Suresh,
      You can do this in 2 ways
      1- Using Jenkins email plugins th-cam.com/video/zGeL5vJnE40/w-d-xo.html
      2-Using Java Library th-cam.com/video/qGq9K85mGyA/w-d-xo.html

  • @shreedeevi2800
    @shreedeevi2800 2 ปีที่แล้ว +1

    How to differentiate failed ans passed testcases without reports

    • @Mukeshotwani
      @Mukeshotwani  2 ปีที่แล้ว +1

      You can get this information in console.

  • @prasannakulkarni3350
    @prasannakulkarni3350 8 ปีที่แล้ว

    super video

  • @svpglb
    @svpglb 4 ปีที่แล้ว +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว +3

      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?

  • @rajeevbhaskar7814
    @rajeevbhaskar7814 5 ปีที่แล้ว

    How to do it in Nunit?

  • @aravindreddyalla7617
    @aravindreddyalla7617 7 ปีที่แล้ว +1

    Then how to execute single testcase 10000 times???

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว +1

      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());
      }

  • @dorg99
    @dorg99 8 ปีที่แล้ว

    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();

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hi Dror what is issue here?

    • @dorg99
      @dorg99 8 ปีที่แล้ว

      No issue. I didn't see the code from the video, so wrote it here in case people want to copy it :)