Access current re-run iteration from script (javascript)
- 12 months ago
Well I found the property I was looking for, it can be accessed by calling Project.TestItems.Current.Iteration, it will return the number of the re-run iteration for each test case.
----
For those who are so shocked by the idea of re-running a test case, if it wasn't necessary to "re-run/re-try" anything, then we wouldn't have "try-catch" in programming languages, and certaintly TestComplete or any other tool wouldn't have such feature implemented. Sure, if your tests are 2 clicks and a string validation, then a re-run is not needed; but when you work with multiple applications and a temporary server downtime can bring one app down for 20 seconds and later work fine, then yes, it's better to have a re-run that will make my test pass the second time, than whining about a 20 seconds downtime on a lower environment; and I can give countless examples of the "re-run" being a useful tool which doesn't compromise the overall results of the QA process and actually makes it even a useful tool for further analysis of the applications' stability.
I don't understand why people feel the need to criticise other's work without even knowing why we're doing what we're doing.