Starting a test script from within a script

Test scripts can contain methods that invoke other test scripts. You might want to take advantage of this functionality by creating a test script that serves as a command file for a suite of scripts.

You can use the callScript method as follows:


....
// import statements and comments 
import myscripts;// Added so script can find test3.

public class RegressionSuite extends RegressionSuiteHelper 
{
public void testMain (Object[] args)
{ 
    callScript("test1");
    callScript(new test2());
    callScript("myscripts.test3"); 
} 
}

Do not call the testMain method from another test script (for example, test1.testMain(...);). Test UI would then be unable to ensure that each test script is invoked properly and has the expected event handling support.