I have most of my test cases set with the Error behavior set to Continue with iteration and when possible, I handle all potential errors with "soft" exceptions, to make the test cases to continue with next iterations. However, in certain cases, I want to kill the Test case and ignore all the remaining iterations. Unfortunately, I cannot find a way to do so.
For example, I have a method, which detects if the application is still present/active. This method is called at various places in each iteration. If the method detects that the application is not available, it should kill the test case/all its remaining iterations. Here is what I already tried so far:
throw new Ranorex.ValidationException(); throw new RanorexException(); throw new Exception(); Validate.IsFalse(true);All these options terminates the actual iteration, however, the test case still continues with the next iteration.
The reason why I'm trying to kill the TestCase/ignore remaining iterations is that running iterations, with no hope to finish them correctly, is a waste of time. And at second, each exception thrown during each iteration saves screenshot to report, which makes the reports huuuuuge, especially in case of high number of failed iterations. Any idea how to solve that? I'm sure there must be a command to simply stop/kill the given TestCase?
So far, I'm using Rx 4.1.5.
BTW, I've tried to solve terminating iteration in the past and I found a solution to do so for single iteration (discussed here). However, that problem was something else. At that time, I just wanted to kill single iteration and then continue with the next one and this one from second thread But now I just want to kill whole test case.