Forum Discussion

nitinn's avatar
nitinn
Occasional Contributor
7 years ago
Solved

Re-running failed test cases

Hello,

I am running a set of 15 tests.I want to re-run the failed test cases at the end of test execution.

Is there anyway through which I can identify the failed test cases and then re-run them at the end of execution.

 

Thank you

 

12 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Short answer: no.  There is no built in functionality in TestComplete to indicate that, if a test case is failed, to re-run it.

     

    In truth, this is a feature/functionality of Test Management software like QA Complete or Jenkins... to identify failed test cases and then, with a set of clicks or whatever, re-run them.  TestComplete executes the tests and reports on them, other apps do the management of what needs to be re-run.

     

    Long answer: If you write enough code, you can do this.  You would need to, somehow, write your tests in such a way that, if they "fail" (and you would need to clearly define a "failure" in code so as to make sure you properly identify it), you would somehow mark the test to be rerun (put the KeywordTest identifier or script routine reference into some sort of Array) and then write code to go through that list of tests and re-execute them.  It can be done.  As I'm fond of saying, you can automate ANYTHING given time, resource, energy and skill.  

  • nitinn's avatar
    nitinn
    Occasional Contributor

    tristaanogre Marsha_R baxatob karkadil

    First of all - Thank you for so much brainstorming :)

    Secondly, my scenario is if I run 15 Test Cases together, 10-12 of them pass but the remaining fail(due to Cache issues,intermittent issues,etc.). The failed test cases when re-executed then pass(without needing any changes into them).

    So I was thinking if I could group them and then re-run them in the end after all the 15 test cases have run,that will solve my problem.

    That is my general idea.