blob: 4fe711ad7db9c3391fd20467ba586505244c194d [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// 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_UIHandler_Test_Definitions
//
// Purpose:
// This module contains tests of EPTF_CLL_UIHandler_CT.
//
// Module depends on:
// EPTF_CLL_Base_Definitions
// EPTF_CLL_UIHandlerClient_Definitions
// EPTF_CLL_UIHandler_Definitions
// EPTF_CLL_UIHandlerVariableUI_Definitions
// EPTF_CLL_Variable_Definitions
// EPTF_CLL_Logging_Definitions
// EPTF_CLL_UIHandler_MsgDefinitions
// TELNETasp_PortType
// EPTF_CLL_Common_Definitions
// ttcn_ericsson_se_protocolModules_xtdp_xtdl
// EPTF_CLL_TransportIPL4_Definitions
// HTTPmsg_Types
//
// Current Owner:
// Janos Zoltan Svaner (EJNOSVN)
//
// Last Review Date:
// 2008-xx-xx
//
// Detailed Comments:
//
///////////////////////////////////////////////////////////////
module EPTF_UIHandler_Test_Definitions
{
//=========================================================================
// Import Part
//=========================================================================
import from EPTF_CLL_Base_Definitions all;
import from EPTF_CLL_UIHandlerClient_Definitions all;
import from EPTF_CLL_UIHandler_Definitions all;
import from EPTF_CLL_UIHandlerVariableUI_Definitions all;
import from EPTF_CLL_Variable_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
import from EPTF_CLL_UIHandler_MsgDefinitions all;
import from TELNETasp_PortType all;
import from EPTF_CLL_Common_Definitions all;
import from ttcn_ericsson_se_protocolModules_xtdp_xtdl all;
import from EPTF_CLL_TransportIPL4_Definitions all;
import from HTTPmsg_Types all;
modulepar {
charstring tsp_BtnTest_Window := "";
boolean tsp_EPTF_UIHandler_headlessmode := true;
boolean tsp_dummyGuiApplied := false;
boolean tsp_EPTF_UIHandler_Test_Debug := false;
}
//Commands driving the test
type set of EPTF_UIHandler_OpenSubscription SubscriptionSet;
type record GetWidgetFromUIHandler { charstring widgetId }
type record GetWidgetFromGui { charstring widgetId }
type union TestMsg {
integer logmsg,
integer reqGetSubscriptions,
SubscriptionSet respGetSubscriptions,
integer stopMsg,
GetWidgetFromUIHandler getWidgetFromUIHandlerMsg, //BAAT
GetWidgetFromGui getWidgetFromGuiMsg, //BAAT
union {
Tabpages tabpages,
Tree tree,
Hbox hbox,
Label label_,
Spacer spacer,
Button button,
Textbox textbox,
Numericalwidget numericalwidget,
Chart chart,
Distributionchart distributionchart,
Image image,
Toolbar toolbar,
Listbox listbox,
Menulist menulist
} getWidgetReply //orig:BAAT -- EPTEBAL
}
//Port to command the UIHandler during the test
type port TestPort_PT message{
inout TestMsg
}with {extension "internal"}
template TestMsg tr_respGetSubscriptions := {respGetSubscriptions := ?};
//Test components
type component EPTF_UIHandler_Test_CT extends EPTF_UIHandler_CT {
port TestPort_PT TestPort_CP;
var boolean v_ready := false;
var boolean v_UIHandler_Test_expectedWarningInitialized:=false;
var boolean v_UIHandler_Test_expectedWarningArrived := false;
var charstring v_UIHandler_Test_expectedWarningMsg:="";
var boolean v_UIHandler_Test_negativeMode := false;
var boolean v_UIHandler_WidgetDisabledInXUL_Test_initialized := false;
var integer vl_intStringlistIdx :=0 ;
var integer v_startBecauseDSIsReady := 0;
private var default v_test_defaltstep := null;
timer t_rtgdelay := 10.0
var charstring v_RTGSimulation_connectToAddress;
var integer v_RTGSimulation_connectToPort;
var integer v_RTGSimulation_reconnectToPort;
var verdicttype v_RTGSimulation_verdictIfNoConnection;
var verdicttype v_RTGSimulation_verdictIfConnection;
var boolean v_RTGSimulation_fullConnection;
}
//type component EPTF_UIHandler_HostAdmin_Test_CT extends EPTF_HostAdminUI_CT {
// timer T1:= 10.0
// var default v_def := null;
//}
type component SYSTEM_CT{
// port XTDPasp_PT EPTF_guiPortIf;
}
type component EPTF_UIHandler_Test_System_CT{
// port XTDPasp_PT EPTF_guiPortIf;
//port XTDPasp_PT EPTF_DummyGui_PCO;
//port UDPasp_PT EPTF_pinger;
}
type component SYSTEM_CLI_CT{
// port XTDPasp_PT EPTF_guiPortIf;
port TELNETasp_PT ExtCmd;
}
type component HandlerClient_CT extends /*EPTF_UIHandlerClient_CT,*/ EPTF_UIHandler_VariableUI_CT{//, EPTF_StatCaptureUI_CT, EPTF_LoadRegulatorUI_CT{
port TestPort_PT TestPort_CP;
//port EPTF_UIHandler_PT EPTF_UIHandler_If; //Widget management interface
}
//this component is the pair of EPTF_UIHandler_Test_CT
type component EPTF_UIHandlerClient_Test_CT extends EPTF_UIHandlerClient_CT {
port TestPort_PT TestPort_CP;
var EPTF_UIHandler_Test_CT v_UIHandlerClient_Test_DefaultUIHandler;
}
//=============================================
//=Name: DummyGui_CT
//=Purpose: To produce a not real gui to be able to give feedback to the testcase
//=Status: Started
//=============================================
type component EPTF_UIHandler_Test_DummyGui_CT extends EPTF_Var_CT, EPTF_Logging_CT {
// port XTDPasp_PT EPTF_DummyGui_PCO;
var boolean v_DummyGui_initialized :=false;
var default v_DummyGui_def := null;
}
type component EPTF_UIHandler_Test_CliClient_CT extends EPTF_Base_CT
{
port TELNETasp_PT CLI_PCO;
port TELNETasp_PT Disp_PCO;
}
type component EPTF_UIHandler_Test_ExpectedWarning_CT extends EPTF_Logging_CT, EPTF_UIHandler_CT {
var boolean v_UIHandler_Test_expectedWarningInitialized:=false;
var boolean v_UIHandler_Test_expectedWarningArrived := false;
var charstring v_UIHandler_Test_expectedWarningMsg:="";
}
//const EPTF_UIHandler_WidgetIdString c_EPTF_GUI_Main_Tabbox_WidgetId := "EPTF_Main_Tabbox";
//const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiExitButtonWidgetId := "EPTF_exit_ttcn_button";
//const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiSnapshotButtonWidgetId := "EPTF_snapshot_button";
template EPTF_UIHandler_GuiItemRec tr_EPTF_UIHandler_guiItemWindow(
template charstring pl_id,
float pl_height,
charstring pl_title,
float pl_width,
template Embeddedwidgets pl_widgets
) :=
{
id := pl_id,
widgetType := wtWindow,
widgetDataType := omit,
parentIdx := -1,
children := {*},
widgetData := omit,
XULformat := {
window := {
about := omit,
height := pl_height,
help := omit,
id := pl_id,
orientation := vertical,
title := pl_title,
width := pl_width,
image_list := ?,
embeddedwidgets := pl_widgets
}
}
}
template EPTF_UIHandler_GuiItemRec tr_EPTF_UIHandler_guiItemToolbar(
template charstring pl_id,
template EPTF_IntegerList pl_children,
template Placement pl_placement) :=
{
id := pl_id,
widgetType := wtToolbar,
widgetDataType := omit,
parentIdx := 0,
children := pl_children,
widgetData := omit,
XULformat := {
toolbar := {
customclass := omit,
disabled := *,
disabledongui := omit,
id := pl_id,
placement := pl_placement,
choice_list := {*}
}
}
}
template EPTF_UIHandler_GuiItemRec t_EPTF_UIHandler_guiItemSeparator(
template charstring pl_id
) :=
{
id := pl_id,
widgetType := wtSeparator,
widgetDataType := omit,
parentIdx := 1,
children := { },
widgetData := omit,
XULformat := {
separator := {
id := pl_id
}
}
}
const charstring c_testTab1Id:= "TestTab1";
const charstring c_testTab2Id:="testTab2";
const charstring c_EPTF_Test_Main_Tabbox_WidgetId:="EPTF_Main_Tabbox";
const charstring c_EPTF_Test_treeId := "test_table";
const charstring c_EPTF_col1Id:= "coloumn1Id";
// widget id of time elapsed
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiTimeElapsedWidgetId :=
"EPTF_timeElapsed"
// widget id of main windows
const EPTF_UIHandler_WidgetIdString c_EPTF_GUI_Main_Window_WidgetId := "EPTF_Main_Window";
// widget id of main tabbox
const EPTF_UIHandler_WidgetIdString c_EPTF_GUI_Main_Tabbox_WidgetId := "EPTF_Main_tabbox";
// widget id of main hbox
const EPTF_UIHandler_WidgetIdString c_EPTF_GUI_Main_hbox_WidgetId := "EPTF_Main_hbox";
// widget id of start test button
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiStartTestButtonWidgetId :=
"EPTF_start_test_button"
// widget id of stop test button
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiStopTestButtonWidgetId :=
"EPTF_stop_test_button"
// widget id of runtie GUI run test button
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiRunTestButtonWidgetId :=
"EPTF_run_test_button";
// widget id of runtime GUI exit ttcn button
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiExitButtonWidgetId :=
"EPTF_exit_ttcn_button";
// widget id of runtime GUI snapshot button
const EPTF_UIHandler_WidgetIdString c_EPTF_runtimeGuiSnapshotButtonWidgetId :=
"EPTF_snapshot_button";
group BrowserGUI_Test {
type component BrowserSimulation_CT extends EPTF_Base_CT, EPTF_TransportIPL4_CT {
var integer connectionId := -1;
var charstring v_reveivedMsg := "", v_expectedMsg := "";
var integer v_receivedStatus := -1, v_expectedStatus := -1;
var boolean v_negativeTest := false;
var HTTPMessage v_MsgToSend;
var f_EPTF_UIHandler_Test_Browser_receive_CT v_receiveFunction := null
var f_EPTF_UIHandler_Test_Browser_send_CT v_sendFunction := null;
}
type component RTGSimulation_CT extends EPTF_Base_CT, EPTF_TransportIPL4_CT {
var integer connectionId := -1;
var integer reconnectionId := -1;
var verdicttype v_verdictIfConnection;
var verdicttype v_verdictIfNoConnection;
var charstring v_reveivedMsg := "", v_expectedMsg := "";
var HTTPMessage v_MsgToSend;
var f_EPTF_UIHandler_Test_Browser_receive_CT v_receiveFunction := null
var f_EPTF_UIHandler_Test_Browser_send_CT v_sendFunction := null;
var integer v_received := 0;
var boolean v_fullConnection := false;
var integer v_addrequest := 0;
}
///////////////////////////////////////////////////////////
// Type: f_EPTF_UIHandler_Test_Browser_send_CT
//
// Purpose:
// General function type of the sender browserbehaviour functions
//
// Elements:
// -
//
// Detailed Comments:
//
///////////////////////////////////////////////////////////
type function f_EPTF_UIHandler_Test_Browser_send_CT() runs on BrowserSimulation_CT;
///////////////////////////////////////////////////////////
// Type: f_EPTF_UIHandler_Test_Browser_receive_CT
//
// Purpose:
// General function type of the receiver browserbehaviour functions
//
// Elements:
// -
//
// Detailed Comments:
//
///////////////////////////////////////////////////////////
type function f_EPTF_UIHandler_Test_Browser_receive_CT(in octetstring pl_message) runs on BrowserSimulation_CT;
const charstring c_UIHandler_Test_Browser_LGenType := "BrowserLGEN";
}
}//module