Forum Discussion
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.
- whuang6 years agoRegular 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.
- tristaanogre6 years agoEsteemed 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.
- whuang6 years agoRegular Contributor
Yes, I totally agree with you, but if it still reports object cannot be found after I told it to wait for the page to load, I really don't know how to fix the issue then. I try not to hardcode a time out if it is not absolutely necessary to avoid unnecessary waiting.
Related Content
- 4 years ago
- 3 years ago
- 10 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago