| /////////////////////////////////////////////////////////////////////////////// |
| // Copyright (c) 2000-2019 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_WebGUI_Demo_Testcases |
| // |
| // Purpose: |
| // This module contains testcases for testing EPTF DsRestAPI. |
| // |
| // Module Parameters: |
| // - |
| // Module depends on: |
| // <EPTF_WebGUI_Demo_Definitions> |
| // <EPTF_CLL_DsRestAPI_Functions> |
| // <EPTF_WebGUI_Demo_Functions> |
| // <EPTF_CLL_Base_Functions> |
| // <EPTF_CLL_HostAdmin_Functions> |
| // <EPTF_CLL_HostAdminServer_Definitions> |
| // <EPTF_CLL_ExecCtrl_Functions> |
| // |
| // Current Owner: |
| // Tamas Kis (ekistam) |
| // |
| // Last Review Date: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| module EPTF_WebGUI_Demo_Testcases { |
| |
| //========================================================================= |
| // Import Part |
| //========================================================================= |
| import from EPTF_WebGUI_Demo_Definitions all; |
| import from EPTF_CLL_DsRestAPI_Functions all; |
| import from EPTF_WebGUI_Demo_Functions all; |
| import from EPTF_CLL_Base_Functions all; |
| import from EPTF_CLL_HostAdmin_Functions all; |
| import from EPTF_CLL_HostAdminServer_Definitions all; |
| import from EPTF_CLL_ExecCtrl_Functions all; |
| import from EPTF_CLL_DataSource_Functions all; |
| |
| //========================================================================= |
| // Testcases |
| //========================================================================= |
| |
| /////////////////////////////////////////////////////////// |
| // Testcase: tc_EPTF_WebGUI_Demo_init |
| // |
| // Purpose: |
| // to test f_EPTF_DsRestAPI_init_CT() function |
| // |
| // Requirement: |
| // - |
| // |
| // Action: |
| // - calls f_EPTF_DsRestAPI_init_CT() function |
| // - calls f_EPTF_Base_stop() function |
| // |
| // Expected Result: |
| // - pass |
| /////////////////////////////////////////////////////////// |
| testcase tc_EPTF_WebGUI_Demo_init() runs on WebGUI_Demo_CT { |
| f_EPTF_Base_init_CT("WebGUI_Demo_init"); |
| f_EPTF_DsRestAPI_init_CT("WebGUI_Demo_init"); |
| f_EPTF_Base_stop(pass); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Testcase: tc_EPTF_WebGUI_Demo_manual |
| // |
| // Purpose: |
| // to test f_EPTF_DsRestAPI_init_CT() function |
| // |
| // Requirement: |
| // - |
| // |
| // Action: |
| // - calls f_EPTF_DsRestAPI_init_CT() function |
| // - calls f_EPTF_Base_stop() function |
| // |
| // Expected Result: |
| // - pass |
| /////////////////////////////////////////////////////////// |
| testcase tc_EPTF_WebGUI_Demo_manual() runs on WebGUI_Demo_CT { |
| f_EPTF_Base_init_CT("WebGUI_Demo_init"); |
| f_EPTF_WebGUI_Demo_init_CT("WebGUI_Demo_init"); |
| |
| f_EPTF_DataSource_registerReadyCallback(refers(f_EPTF_WebGUI_Demo_checkReady)); |
| |
| var EPTF_HostAdminServer_CT vl_hostAdminServer_compRef := EPTF_HostAdminServer_CT.create; |
| vl_hostAdminServer_compRef.start(f_EPTF_HostDminServerBehaviour()); |
| f_EPTF_HostAdmin_init_CT(f_EPTF_Base_selfName(), pl_dataSource_compRef := self/*, pl_server_Ref := v_hostAdminServer_compRef*/); |
| |
| f_EPTF_ExecCtrl_setManualControl(true); |
| |
| f_EPTF_ExecCtrl_loadConfig( |
| pl_EPTF_LGenBase_ScenarioDeclaratorList := {}, |
| pl_EPTF_LGenBase_tcTypeDeclaratorList := {}, |
| pl_EPTF_LGenBase_TcMgmt_ScenarioDeclaratorList := {}, |
| pl_EPTF_LGenBase_TcMgmt_WeightedScenarioDeclaratorList:= {}, |
| pl_EPTF_ExecCtrl_TimeProfileDescrList:={}, |
| pl_EPTF_ExecCtrl_TimeProfileList:={}, |
| pl_EPTF_ExecCtrl_TimeProfile2TcList:={}, |
| pl_EPTF_ExecCtrl_ScenarioInstanceTypeList:={}, |
| pl_EPTF_ExecCtrl_LGenFunction_Entry_List:={{ |
| name := omit, |
| fn := refers(f_ExecCtrl_Test_createDefaultLGen) |
| }}, |
| pl_EPTF_ExecCtrl_PhaseList_Declarators:={}, |
| pl_EPTF_ExecCtrl_ScenarioGroup_Declarators:={}, |
| pl_EPTF_ExecCtrl_RegulatorNames:={"LimitMaxRegulator"} |
| ); |
| |
| f_EPTF_ExecCtrl_init_CT(f_EPTF_Base_selfName(), 0, pl_dataSource_compRef := self); |
| |
| var integer vl_Ret := f_EPTF_DsRestAPI_start(tsp_EPTF_DsRestAPI_HTTPServer_RemoteAddress, tsp_EPTF_DsRestAPI_HTTPServer_RemotePort, tsp_EPTF_DsRestAPI_HTTPServer_directory, tsp_EPTF_DsRestAPI_customizableApp_directory, tsp_EPTF_DsRestAPI_API_directory); |
| if (vl_Ret == 0) { |
| f_EPTF_Base_wait4Shutdown(); |
| } else { |
| f_EPTF_Base_stop(fail); |
| } |
| } |
| |
| //========================================================================= |
| // Control |
| //========================================================================= |
| control { |
| execute(tc_EPTF_WebGUI_Demo_init()); |
| execute(tc_EPTF_WebGUI_Demo_manual()); |
| } |
| |
| } // module |