TestBase { Parameters { Out Const String TestId; // TestId is set to TEST_NAME or FLOW_NAME at time of instantiation. Out Int execResult = PASS; // 0 = PASS, non-zero (pos or neg) = FAIL In Bin FailBin = NoBin; } PreActions {} // TestExec; PostActions {} PassActions {} FailActions { // SetBinStop FailBin; // Semantics: If (FailBin != NoBin) { SetBin FailBin; Stop; } Else { // No Action } SetBin FailBin; } } TestType MyTestType1 { Inherit TestBase; // Optional // No additional parameters - use only parameters as specified in TestBase // No PreActions - use TestBase PreActions TestExec; // Execute the TestType named MyTestType1 // No PostActions - use TestBase PostActions // No PassActions - use TestBase PassActions // No FailActions - use TestBase FailActions } TestType MyTestType2 { Inherit TestBase; // Optional // No additional parameters - use only parameters as specified in TestBase // No PreActions - use TestBase PreActions FuncExec MyFunc2; // Execute the Test Function named MyFunc2 // No PostActions - use TestBase PostActions // No PassActions - use TestBase PassActions // No FailActions - use TestBase FailActions } TestType MyTestType3 { Inherit TestBase; // Optional // No additional parameters - use only parameters as specified in TestBase // No PreActions - use TestBase PreActions FuncExec { MyFunc3a; MyFunc3b; } // Execute the Test Functions named MyFunc3a and MyFunc3b // No PostActions - use TestBase PostActions // No PassActions - use TestBase PassActions // No FailActions - use TestBase FailActions } // The default FlowType is the unnamed FlowType. Note that only one unnamed FlowType is allowed. // If the user does not provide the definition of the unnamed FlowType, the standard dictates that // the environment or toolset provide the following definition. FlowType { Inherit TestBase; // Optional // No parameters - use only TestBase parameters // No PreActions - use TestBase PreActions // No FlowNodes are specified in the type definition. The FlowNodes will be provided at instantiation // No PostActions - use TestBase PostActions // No PassActions - use TestBase PassActions FailActions { Stop; } } Test MyTestType1 MyTest1; Test MyTestType2 MyTest2; Test MyTestType3 MyTest3; // FlowType not specified - so use FlowType stil_flow_type_default Flow MainFlow { FlowNode Node1 { // No PreActions TestExec MyTest1; SetResult MyTest1.execResult; // No PostActions ExitPorts { // Variable Result (allowed ONLY in FlowNode blocks) is set by the return value from the TestExec. // Stop jumps immediately to the initiating EntryPoint, with the return value of Result. Port FAIL: Result == FAIL { SetBin MyTest1.failBin; Stop; } Port PASS: Result == PASS { Next; } } // end ExitPorts } FlowNode Node2 { // No PreActions TestExec MyTest2; SetResult MyTest2.execResult; // No PostActions ExitPorts { Port FAIL: Result == FAIL { SetBin CurrentExec.failBin; Stop; } Port PASS: Result == PASS { Next; } } // end ExitPorts } FlowNode NodeSubFlow { // No PreActions TestExec SubFlow1; SetResult SubFlow1.execResult; // No PostActions ExitPorts { Port FAIL: Result == FAIL { Stop; } Port PASS: Result == PASS { Next; } } // end ExitPorts } FlowNode Node3 { // No PreActions TestExec MyTest3; SetResult MyTest3.execResult; // No PostActions ExitPorts { Port FAIL: Result == FAIL { SetBin MyTest3.failBin; Stop; } Port PASS: Result == PASS { Stop; } } // end ExitPorts } } // FlowType not specified - so use FlowType stil_flow_type_default Flow SubFlow1 { FlowNode Node1 { // No PreActions TestExec MyTest1; // SetResult not specified - so defaults to SetResult CurrentExec.execResult; (i.e., MyTest1.execResult) // No PostActions ExitPorts { Port FAIL: Result == FAIL { SetBin MyTest1.failBin; Return Result; } Port PASS: Result == PASS { Next; } } // end ExitPorts } FlowNode Node2 { // No PreActions TestExec MyTest2; // SetResult not specified - so defaults to SetResult CurrentExec.execResult; (i.e., MyTest2.execResult) // No PostActions ExitPorts { Port FAIL: Result == FAIL { SetBin MyTest2.failBin; Return Result; } Port PASS: Result == PASS { Return Result; } } // end ExitPorts } } TestProgram Jim { EntryPoints { OnStart MainFlow; } }