Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exit Condition

harsha_s
Advisor
Advisor
0 Likes
719

Hello Colleagues,

In my main script i refer to 3 different scripts .

1) Ref ( Script 1 ) -


if there are some unexpected things then i am asking the control to exit from this script .

2) Ref( Script 2)

3) Ref( Script 3) .

After control comes out of script 1 , i do not want it to execute Script 2 and Script 3.

because Script 2 and Script 3 Gets input from Script 1 and if Script 1 itself is failing no point in executing script 2,3.

Can you kindly help me as to how to tackle the issue ?.

regards

harsha

4 REPLIES 4
Read only

venkatesh_sakthivel
Active Participant
0 Likes
680

Hello harsha,

Create a boolean variable in each script which will return the status/run of the Script.

if the value is true then execute the next script,if it is false then skips the script anfd goto next.

Hope it helps..

Regards,

Venky

Read only

0 Likes
680

Hello ,

Can you kindly let me know how to create an Boolean Variable , do we have any datatype for boolean in eCATT ?.

I searched but i was not able to find .

Kindly explain with a small example that will help a lot .

Thanks in advance and regards

Harsha

Read only

0 Likes
680

Hello Harsha,

You can create one export variable in script one and set it to say X if it fails with error . Then in the main script where you have reffered this script you can check if the value of the flag is X then you can add one more exit here.

Hope it answers your question..

Thanks & Best regards,

Ajay

Read only

Former Member
0 Likes
680

Hi Guys,

We could also handle this with the Error Behaviour in Start Options. Select " X Termination of Start Process " if you want to come out with the first error or select " No Termination, Continue with Next Script Command" . There are more options depending on ur usage.

Note: Please save your start options, and adhere to the same start options whenever u script or execute. Otherwise you would face isuses with scripts expecting different start options while doing a collective test run.

Regards,

Justin