| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // Copyright (c) 2000-2018 Ericsson Telecom AB // |
| // // |
| // All rights reserved. This program and the accompanying materials // |
| // are made available under the terms of the Eclipse Public License v2.0 // |
| // which accompanies this distribution, and is available at // |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_LGenBase_Test_TestcasesR4 |
| // |
| // Purpose: |
| // This module provides functions for testing R7 functionalities and bugfixes |
| // of LGenBase |
| // |
| // Module depends on: |
| // - |
| // |
| // Current Owner: |
| // László Skumát (ELSZSKU) |
| // |
| // Last Review Date: |
| // - |
| // |
| /////////////////////////////////////////////////////////////// |
| module EPTF_LGenBase_Test_TestcasesR7 |
| // [.objid{ itu_t(0) identified_organization(4) etsi(0) |
| // identified_organization(127) ericsson(5) testing(0) |
| // <put further nodes here if needed>}] |
| { |
| import from EPTF_CLL_LGenBase_TrafficFunctions all; |
| |
| import from EPTF_CLL_LGenBase_Functions all; |
| |
| import from EPTF_CLL_LGenBase_ConfigDefinitions all; |
| |
| import from EPTF_CLL_LGenBase_ConfigFunctions all; |
| |
| import from EPTF_CLL_Base_Functions all; |
| |
| import from EPTF_LGenBase_Test_Definitions all; |
| |
| group invalidFSM{ |
| const charstring c_EPTF_LGenBase_Test_InvalidStepName := "InvalidStep" |
| const EPTF_LGenBase_FsmTableDeclarator c_FSM := { |
| name := "varAndStatParams", |
| fsmParams := |
| { |
| {varList := |
| {{ |
| name := "var1", |
| initValue := {intVal := 9}, |
| scope := FSM |
| }, |
| { |
| name := "var2", |
| initValue := {intVal := 9}, |
| scope := TC |
| }} |
| }, |
| {statMeasStatList := { |
| {"chrono1","",chrono,FSM}, |
| {"chrono2","",chrono,TC} |
| }}, |
| {stateList := {"idle", "busy","third"}} |
| }, |
| table := { |
| extendedTable := { |
| { |
| events2Listen := {events := { |
| { singleEvent := {"b1","event", fsm} } |
| }}, |
| cellRow := { statedCellRow := { |
| { |
| inState := {state := "idle"}, |
| cell := { |
| { |
| {c_EPTF_LGenBase_Test_InvalidStepName,omit} |
| },omit,omit} |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Testcase: tc_EPTF_LGenBase_Test_invalidStepName |
| // |
| // Purpose: |
| // This is a negative test. |
| // It tests if LGenBase handles invalid Step function names correctly. |
| // |
| // Requirement: |
| // - |
| // |
| // Action: |
| // - |
| // |
| // Expected Result: The tc is passed if we get the proper error message. |
| // |
| /////////////////////////////////////////////////////////// |
| // Status: Ready, passed |
| testcase tc_EPTF_LGenBase_Test_invalidStepName() |
| runs on EPTF_LGenBase_Test_CT{ |
| f_EPTF_LGenBase_init("invalidStepName") |
| f_EPTF_Base_setExpectedErrorMsg("*Invalid step function: InvalidStep *") |
| v_dummyInt := f_EPTF_LGenBase_declareFSMTable(c_FSM) |
| setverdict(fail, "EPTF Error should have been called") |
| f_EPTF_Base_cleanup_CT() |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Testcase: tc_EPTF_LGenBase_Test_invalidStepType |
| // |
| // Purpose: |
| // This is a negative test. |
| // It tests if LGenBase handles invalid Step function types correctly. |
| // |
| // Requirement: |
| // - |
| // |
| // Action: |
| // - |
| // |
| // Expected Result: The tc is passed if we get the proper error message. |
| // |
| /////////////////////////////////////////////////////////// |
| // Status: Ready, passed |
| testcase tc_EPTF_LGenBase_Test_invalidStepType() |
| runs on EPTF_LGenBase_Test_CT{ |
| f_EPTF_LGenBase_init("invalidStepType") |
| f_EPTF_Base_setExpectedErrorMsg("*Invalid step function type: InvalidStep *") |
| v_dummyInt := f_EPTF_LGenBase_declareFunction(c_EPTF_LGenBase_Test_InvalidStepName, {evaluateSuccess4EntityAtEntityGroup2 := refers(f_EPTF_LGenBase_successSucNoFail)}) |
| v_dummyInt := f_EPTF_LGenBase_declareFSMTable(c_FSM) |
| setverdict(fail, "EPTF Error should have been called") |
| f_EPTF_Base_cleanup_CT() |
| } |
| } |
| control{ |
| execute(tc_EPTF_LGenBase_Test_invalidStepName()) |
| execute(tc_EPTF_LGenBase_Test_invalidStepType()) |
| } |
| } // end of module |