Forum Discussion

whuang's avatar
whuang
Regular Contributor
5 years ago

Anyway to rerun failed test automatically?

Hello,

I have read some post here and realized that TC doesn't have any build in function to rerun failed test automatically. I found this topic (Rerun Tests) mentioned that QAComplete has the feature to rerun failed tests, but it looks like manual rerun. I was wondering is there anyway, QAComplete can automatically rerun failed tests? Because we usually launch the tests and keep it running overnight, but if the tests finished in the middle of the night with failures, it will just seat there and wait for me to launch the next morning. So I was looking for QAComplete or any other way to automatically rerun the failed tests after the execution is done. Does anyone know anyway to achieve this?

 

Thanks in advance!

10 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Here's the question I always have on this topic:

     

    Why re-run the failed tests right away? They failed for a reason. Either the automation was created incorrectly and they failed due to coding errors.  Or, they failed because a bug was found and needs to be corrected by the developers.  Either way, re-running a failed test automatically will rarely, if ever, do any real good.  Intervention is needed in both cases in order to get the test run pass.

    • whuang's avatar
      whuang
      Regular Contributor

      Thanks tristaanogre , I don't know why sometimes a test failed at the first round and if I rerun it would pass at the second round without making any change to the code. I have seen a lot of people here had this issue. Maybe it was the performance issue of the virtual machine? what happens the most is object cannot be found, but from the error screenshot I can clearly see that the object is on the page, and I did wait for the page to load. So if a rerun can solve the problem, I hope to get it run by itself ideally.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        That's still an indication that something needs to be corrected in the automation.  This is what we "lovingly" refer to here on the community as "timing" issues.  It takes time, sometimes, for an object to appear.  And the automation tries to run as fast as possible unless told to wait or detect or find.  An even if you have those detections and waits in place, they may not be set to wait long enough.  So, while it's an intermittent problem, it's still one that needs to be resolved.  A rerun did not "fix" the problem, just you happened to run it in a situation where the application is not under as heavy a load, where the timing worked out better, etc.  So, you rerun it today and it works... tomorrow it may fail again at the same point for the same reason.  A failed test is a failed test.  Fix the failure THEN re-run.