Since Ranorex does not provide re-run functionality from under the hood, I have to write my own and before I started, just want to ask for advice from people who've done it or maybe possible existing solution on the market.
Goal is:
- In the end of the run, to re-run failed test cases.
Requirements:
Amount of recursive iterations should be customized
If Data binding is used, should include only Iterations for Data binding that failed
Possible solutions:
1a. Based on the report xml: Parse report and collect info about all failed TC.
Cons: Parse will be tricky
or:
1b. Or create list of failed TC on runtime : If failure occurs on tear-down add this iteration to the re-run list (could be file or DB table).
Using for example:
then:
2a. Based on the list, run executable with parameters, looping though each record. like this:
or:
2b. Or generate new TestSuite file .rxtxt and recompile solution to created updated executable.
and last part:
3a. In the end repeat process, checking that
failedTestCases == 0 || currentRerunIterations < expectedRerunIterations
with script through CI run executableor:
3b. Wrap whole Test Suite into Rerun test module and do the same check for
failedTestCases == 0 || currentRerunIterations < expectedRerunIterations
and run Ranorex from TestModulePlease let me know what you think about it.