I'm using VS2010 Premium, Coded UI Tests.
Do you know how to re-execute failed test cases after run? If test was passed after re-execution then it should be passed in result report.
I'm using VS2010 Premium, Coded UI Tests.
Do you know how to re-execute failed test cases after run? If test was passed after re-execution then it should be passed in result report.
Not so optimal way but you could put all your code to
try/catch
block and rerun the test if an exception is thrown:You could also generalize the method Schaliasos proposes, we could create a base class like this:
And then when we write tests we could inherit the class above and do this:
I have been thinking about how this could be made even simpler, any suggestions would be appreciated. This at least saves quite a bit of code if you have many tests that you would like to run often, maybe it would make sense for some to generalize the function TryThreeTimes so one of the arguments would be the number of reruns.