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 { // Stop: Stop execution of FlowNodes and return up the call chain from this point up to the EntryPoint which // initiated the execution, executing the PostActions and PassActions or FailActions of any Tests or Flows // encountered, but skipping execution of any additional FlowNodes, including PostActions or ExitPort actions // of those flow nodes. // Exit: Jump directly to initiating EntryPoint, executing no Test or Flow PostActions, PassActions, or FailActions, // and executing no more FlowNodes and FlowNode ExitPort selection and Actions. The pass/fail result returned to // the EntryPoint initiator (which would normally be the ExecResult of the Test or Flow specified by the EntryPoint), // is specified by the integer_expr token of the "Exit ;" statement. This statement is generally // intended to be used for exceptions, such as hardware failures, which require immediate termination of test execution. SetBinStop FailBin; // Semantics: If (FailBin != NoBin) { SetBin FailBin; Stop; } Else { // No Action } } } FlowNode { PreActions { } TestExec NullExec; // NullExec ONLY allowed in default FlowNode definition. PostActions { } ExitPorts { Port FAIL CurrentExec.ExecResult == Fail { // Set the ExecResult of the Test or Flow containing // this FlowNode. Either the hard-coded value Fail // or the ExecResult of the Test or Flow which this // FlowNode executed can be used. CurrentExec is an // alias for EXEC_OBJECT_NAME ExecResult = Fail; or ExecResult = CurrentExec.ExecResult; // Stop execution of FlowNodes, and return to calling Test // or Flow. Stop; } Port PASS CurrentExec.ExecResult == Pass { Next; } } // end ExitPorts } // end FlowNode 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 // At this level, there's no real difference between Return and Stop, since the Flow containing these // two FlowNodes is called directly by an EntryPoint. Flow MainFlow { FlowNode Node1 { // No PreActions - use FlowNode default PreActions TestExec MyTest1; // No PostActions - use FlowNode default PostActions ExitPorts { // Set ExecResult of Flow MainFlow to Fail. Stop resumes execution at Flow MainFlow PostActions. Port FAIL: MyTest1.ExecResult == FAIL { ExecResult = Fail; SetBin MyTest1.FailBin; Stop; } Port PASS: MyTest1.ExecResult == PASS { Next; } } // end ExitPorts } FlowNode Node2 { // No PreActions - use FlowNode default PreActions TestExec MyTest2; // No PostActions - use FlowNode default PostActions ExitPorts { Port FAIL: CurrentExec.ExecResult == FAIL { ExecResult = Fail; SetBin CurrentExec.FailBin; Stop; } Port PASS: CurrentExec.ExecResult == PASS { Next; } } // end ExitPorts } FlowNode NodeSubFlow { // No PreActions - use FlowNode default PreActions TestExec SubFlow1; // No PostActions - use FlowNode default PostActions ExitPorts { Port FAIL: CurrentExec.ExecResult == FAIL { ExecResult = Fail; Stop; } Port PASS: CurrentExec.ExecResult == PASS { Next; } } // end ExitPorts } FlowNode Node3 { // No PreActions - use FlowNode default PreActions TestExec MyTest3; // No PostActions - use FlowNode default PostActions ExitPorts { Port FAIL: CurrentExec.ExecResult == FAIL { ExecResult = Fail; SetBin MyTest3.FailBin; Stop; } Port PASS: CurrentExec.ExecResult == PASS { Stop; } } // end ExitPorts } } // FlowType not specified - so use FlowType stil_flow_type_default Flow SubFlow1 { FlowNode Node1 { // No PreActions - use FlowNode default PreActions TestExec MyTest1; // No PostActions - use FlowNode default PostActions ExitPorts { // Set ExecResult of Flow SubFlow1 to Fail. Stop resumes execution at Flow SubFlow1 PostActions. Port FAIL: CurrentExec.ExecResult == FAIL { ExecResult = Fail; SetBin MyTest1.FailBin; Return; } Port PASS: CurrentExec.ExecResult == PASS { Next; } } // end ExitPorts } FlowNode Node2 { // No PreActions - use FlowNode default PreActions TestExec MyTest2; // No PostActions - use FlowNode default PostActions ExitPorts { Port FAIL: CurrentExec.ExecResult == FAIL { ExecResult = Fail; SetBin MyTest2.FailBin; Return; } Port PASS: CurrentExec.ExecResult == PASS { Return; } } // end ExitPorts } } TestProgram Jim { EntryPoints { OnStart MainFlow; } }