Try
The try tag allows you to catch exceptions being thrown from
other tags and take an action based on that exeption. This tag
is useful within the context of failures scenarios or negative
testcases.
Children Tags
Usage Examples
Example #1
<try>
<sequence>
<local>
<echo>This will naturally succeed.</echo>
</local>
</sequence>
<catch exception="com.yahoo.dtf.exception.*">
<local>
<fail message="This part should never be executed." />
</local>
</catch>
</try>
Example #2
<try>
<sequence>
<local>
<echo>This should succeed: ${property}.</echo>
</local>
</sequence>
<catch exception="com.yahoo.dtf.exception.ParseException">
<local>
<fail message="This part should never be executed." />
</local>
</catch>
<catch exception="com.yahoo.dtf.exception.*">
<local>
<fail message="This part should never be executed." />
</local>
</catch>
</try>