We are building a test suite in which we are using retries for each test case. In the teardown of each test case, we have a recording which checks the status of the testsuite, in order to determine if a snapshot should be captured:
Code: Select all
Program.RUN_COUNT[TestSuite.CurrentTestContainer.Name]++;
int retryCount = ((TestCaseNode)TestSuite.CurrentTestContainer).RunRetryCount;
if (TestSuite.CurrentTestContainer.Status == Ranorex.Core.Reporting.ActivityStatus.Failed &&
Program.RUN_COUNT[TestSuite.CurrentTestContainer.Name] > retryCount) {
Report.Snapshot(repo.Idea64.Self);
}
Is this a bug in Ranorex? Is there a better way to only capture a snapshot on the last retry and only if the test failed on the last retry?
This is important because capturing a snapshot takes a LONG time and can actually hang the Ranorex process (we suspect memory issues).