a) You can use two types of call statements to invoke one test from another:
i. A call statement invokes a test from within another test.
ii. A call_close statement invokes a test from within a script and closes the test when the test is completed.
iii. The call statement has the following syntax:
1. call test_name ( [ parameter1, parameter2, ...parametern ] );
iv. The call_close statement has the following syntax:
1. call_close test_name ( [ parameter1, parameter2, ... parametern ] );
v. The test_name is the name of the test to invoke. The parameters are the parameters defined for the called test.
vi. The parameters are optional. However, when one test calls another, the call statement should designate a value for each parameter defined for the called test. If no parameters are defined for the called test, the call statement must contain an empty set of parentheses.

[Source: JAGAN MOHAN "Interview questions bible"]






Answers and Comments