Hi ,
Is there any method that can be used to exit a test case iteration during run time when running from test suite.
did you try
System.exit(0)
System.exit(0),will exit entirely… What I try to achieve is to exit current iteration
in that case:
return 0
Thanks Andrej, I have tried with return 0 at the TestListner, however the test iteration is not skip, the test case still continue
return can exit just current fn() script. you need to implement some signal variable that will be checked when needed and based on that return will be executed
Hi Andre, I do not intended to exit function. What I want to do is exit the test case iteration Ie when we run from test suite, multiple iteration is run, I need to exit the test iteration if some condition is met. System. Exit is exiting the entire test suite while return 0 is exiting only a function… Both do not achieve the exit test case iteration , and move to next test iteration
what about 2nd part of my answer? implementing signal variable ?
Signal variable? Are you referring to the condition to determine when to execute the exit Yes I have already have the condition set .All I need is to be able to exit the test case iteration
my guess is, you will need implement return on every level of execution
TS listeners, TS setup, TC listeners, TC Setup, TC, TC Teardown …
i don’t think there is way how to stop iteration on TS level by some kind of exit… (but i can be wrong) only chance is to exit each level as soon as possible to save exec. time
Thanks Andrej, I guess the same too.