Script Exit ( Exit All Won't Work For My Scenario)

Hello,

I’ve done some searching but I can’t seem to find a solution for what I need to accomplish.

I have a script that runs a series of related scripts/workflows.

– Main Script
Run A
Run B
Run C

From time to time, the workflow deviates and a script can be ended without running the remaining code in a given script. I would use an Exit All but this prevents the execution of any remaining scripts that have yet to run in the main script.

Is there a way to do this?

Sorry. Forgot to mention that the code is in a handler. It appears that I can exit the handler at any time but not the parent script?

Thanks,

Hey @Bill,

Exit script and/or exit handler should both work in your case. A script is technically a handler in eggplant Functional .

Cheers,
Karsten

Hi Bill.

I think that you and I have discussed some options, but so that other readers are aware:

Try Run A
Try Run B
Try Run C

The caveat is that while no one script will cause the master to fail, if there are steps needed to return the application under test to a stable state after, for example, Run A fails, simply placing a try in front of each line will not help.