Forum Discussion

Kotaibaw's avatar
Kotaibaw
Occasional Contributor
7 years ago

how to rerun testCase in case if its falied.

hi, i want to rerun testCase in case it will fail.

 

we have few TestSuite we want to take all the failed TC from all the Suite and do rerun on each one of them

 

its possible how to know if testCase failed from diff TestSuite and to rerun all the test case which failed from all the testSuite.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    A test suite, even a test project, are generally self contained entities, natively unaware of what was passed or failed from other test suites or test projects. Or, for that matter, what failed in a previous run. In order to do what you ask, when a test suite runs, you will need to document or export during the test run all the failed test cases into some sort of data record.  That data record can then be read into another test project to dictate what tests to run.  However, that other test project will need to still include, in it's project information, ALL the test cases that could POSSIBLY be run in order for it to be "smart" enough to run those it needs to run.

    Your best bet is to track passes and failures in some other system (such as QA Complete or similar technology) and then use that tool to build and run additional re-runs of failed tests.

    • Kotaibaw's avatar
      Kotaibaw
      Occasional Contributor

      can i use Groovy or existing utility in soap ui  to run failed TC in same testSuite?

       

      or in case testCase failed can i rerun it only once? 

       

      the purpose is to run the TC which failed once in case it will fail again then it will be marked as failed.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Are you asking about test suites in TestComplete or SoapUI? This is the forum for discussion and help with the TestComplete tool.  Concerning SoapUI... don't know.  I'm not incredibly familair with the tool.

         

        However, with TestComplete, I'll say this... it's possible to do anything you want... but it's a matter of how much time you want to invest.  

         

        To your specific question, there's not a built in utility in TestComplete to re-run a failed test case.  The primary reason for this, as far as I can discern, is because a "Test Case" in TestComplete is a rather nebulous deal.  Is it a Test Item under View -> Organize tests?  Is it a single script code function/routine? Is it a single Keyword test? Is it some organizational construction of multiple script routines in a data driven framework using a POM?  How do you define a "test case" in a tool where a "test case" could mean any number of things?  So, if you want something that will take a test case, run it, see if it failed, and if it failed, re-run it once before marking it as failed, that's something that can be done... but you'll need to write some sort of code framework in order to do this with what you have defined as a "test case".