I just need the code to completely stop all execution if a condition is met.... Do not pass go, do not tear down, just stop.
I have a restore function, that if it fails, is closing the application via the teardown, which leaves a backup process running. I want to just stop everything, report back the error, and let a person re-stage the system properly before the next run.
Right now, here's a simplified version of my code:
Code: Select all
try{
Report.Log(ReportLevel.Info, "Wait", "Waiting 30s to exist. Associated repository item: 'rawtextInfo'", rawtextInfo, new ActionTimeout(30000));
rawtextInfo.WaitForExists(30000);
}
catch {
throw new Ranorex.RanorexException("Failed to restore backup, exititing test execution");
}
What code stops the whole thing??