Automatic rerun of failed test cases in Robot Framework

3,504 views
Skip to first unread message

Peersheik Lathief

unread,
Jan 17, 2013, 7:14:26 AM1/17/13
to robotframe...@googlegroups.com
Hi,

Question 1: Automatic rerun of failed test cases

Is there any mechanism to automatically re-run failed test cases in Robot framework.

For example 
if 10 test cases are in a suite file. when running as batch, 3 test cases are failed due to timing issue or some other issue. We can assume that these test cases can be passed in rerun with out any changes. Do we have mechanism in robot framework to automatically rerun the failed test cases ?. 

Either re-run the test case which failed before running the next test cases in suite  

or 

Once the suite execution is complete, re-run the failed test cases of the suite.

Question 2: Conditional execution of suite

Is there any mechanism in Robot framework to run the test suite only if the condition match other than the tag is applied to suite.

For example, i want to run this test suite file, if my previous test suite is passed or my pre-condition suite is executed successfully.

Thanks & Regards,
Peer Sheik

Tatu Aalto

unread,
Jan 17, 2013, 8:42:37 AM1/17/13
to robotframe...@googlegroups.com
Ugh

Q1: It does not exist out of the box, but in the user list there is a
workaround [1].
Q2: It does not exist out of the box, but in the user list there is a
workaround that could be applied also in your case.
As a general note, test depending of each other is not a good idea and I
would recommended against it.

-Tatu

[1]
https://groups.google.com/forum/?fromgroups=#!searchin/robotframework-users/rerun/robotframework-users/MgYsmtNTeFk/YIL8Bn-EgQkJ
[2]
https://groups.google.com/forum/?fromgroups=#!topic/robotframework-users/hHdAKfmKLpU
> --
> You received this message because you are subscribed to the Google
> Groups "robotframework-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/robotframework-users/-/sMJLyfxtzzMJ.
> To post to this group, send email to
> robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to
> robotframework-u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/robotframework-users?hl=en.

Taylor, Martin

unread,
Jan 17, 2013, 8:50:53 AM1/17/13
to aalto...@gmail.com, robotframe...@googlegroups.com
That reference is an interesting workaround for this particular "re-run failed tests" issue, but I was hoping there might be an even better answer to this question. Something I've often wished for in RF, and may put in an enhancement request for, is to be able to dynamically add permanent tags to test cases at execution time. If such an API exists, or could be created, then an executing test case could set a FAILED tag on failed tests, or other more specialized tags if a test failed for a particular reason. For example, I currently manually tag test cases like "TBD_Menus" if a test case fails due to a problem with the application's menu implementation or "TBD_KW" if it fails due to a keyword not yet existing.

Is there any way to achieve this functionality now? If not, is there anyone else interested in having such a feature?

Thanks,
Martin

Laurent Bristiel

unread,
Jan 17, 2013, 10:20:51 AM1/17/13
to robotframe...@googlegroups.com, aalto...@gmail.com
I am very much interested in the "re-run-failed tests" feature.
I've been checking the issue for a long time: http://code.google.com/p/robotframework/issues/detail?id=702
Giving the last output file as input to detect the failed test seems the best choice to me.

I am not a big fan of your proposition Martin of writting in the test case file directly.
Somehow I don't want Robot to touch the input (i.e. test cases). Only the ouput should be written.
(plus it is complicated to manage afterwards because test cases are often under version control)

My 2 cents,
Laurent
> robotframework-users+unsub...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/robotframework-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages