What is the use of treturn and texit statements in the test script?

The treturn and texit statements are used to stop execution of called tests.
i. The treturn statement stops the current test and returns control to the calling test.
ii. The texit statement stops test execution entirely, unless tests are being called from a batch test. In this case, control is returned to the main batch test.
b. Both functions provide a return value for the called test. If treturn or texit is not used, or if no value is specified, then the return value of the call statement is 0. treturn
c. The treturn statement terminates execution of the called test and returns control to the calling test.
The syntax is:
treturn [( expression )];
d. The optional expression is the value returned to the call statement used to invoke the test.
texit
e. When tests are run interactively, the texit statement discontinues test execution. However, when tests are called from a batch test, texit ends execution of the current test only; control is then returned to the calling batch test.
The syntax is:
texit [( expression )];

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions