blob: b437a6f8a87850a0237163c0df9938c06fd906f9 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2017 Ericsson Telecom AB //
// //
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v1.0 //
// which accompanies this distribution, and is available at //
// http://www.eclipse.org/legal/epl-v10.html //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_LGenBase_Test_Definitions
//
// Purpose:
// This module provides definitions for testing LGenBase
//
// Module depends on:
// -
//
// Current Owner:
// Janos Zoltan Svaner (ejnosvn)
//
// Last Review Date:
// -
//
// Detailed Comments:
// Provide definitions to test
//
//
///////////////////////////////////////////////////////////////
module EPTF_LGenBase_Test_Definitions
{
import from EPTF_CLL_Common_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
import from EPTF_CLL_LGenBase_Definitions all;
import from EPTF_CLL_LGenBase_ConfigDefinitions all;
import from EPTF_CLL_LGenBase_TemplateDefinitions all;
modulepar {
boolean tsp_EPTF_LGenBaseTestDebug:=true;
charstring tsp_EPTF_LGenBase_Test_behaviorTypeName := "TestBehaviorType";
integer tsp_numEntities := 0;
float tsp_testDuration := 30.0;
integer tsp_nrOfLGens := 1;
EPTF_LGenBase_TcMgmt_CompactFsmTableDeclaratorList tsp_modulePar_compactFsmTables := {};
charstring tsp_LGenBase_Test_name := "TestEntity";
EPTF_LGenBase_burstFunc tsp_burstCalcMode := imst2;
EPTF_LGenBase_TcMgmt_tcCustomParamDeclaratorList tsp_params:={{"A","P","V"}};
charstring tsp_tcTypeName := "TrafficCaseName";
EPTF_LGenBase_TcMgmt_TcOfWeightedScenario tsp_tcOfSc:= {
tcName:="TrafficCaseName",
tcWeight := 0.2,
enableEntities := true,
enable := true,
ranges := {
{
name:= "testRange1",
enableSplit:=false,
baseOffset:=0,
count:=10
}
},
params:={{"A","P","V"}},
groupFinishConditions := {
nrOfExecStart := omit,
nrOfSuccesses := omit,
nrOfFails := omit,
nrOfGrpLoop := omit,
nrOfRangeLoop := omit,
execTime := 10.0,
entitiesFinished := omit,
customFinishCondition := omit
},
entityFinishConditions := {
nrOfExecStart := 7,
nrOfSuccesses := 2,
nrOfFails := 5,
customFinishCondition := omit
},
entityFinishActions := {},
tcFinishActions:={}
};
EPTF_LGenBase_TcMgmt_TcOfScenario2 tsp_tcOfSc2 :=
{
tcName:= "TrafficCaseName",
startDelay := 0.001,
cpsToReach := 21.0,
enableEntities := true,
enable := true,
ranges := {
{
name:= "testRange1",
enableSplit:=false,
baseOffset:=0,
count:=10
}
},
params:={{"A","P","V"}},
groupFinishConditions := {
nrOfExecStart := omit,
nrOfSuccesses := omit,
nrOfFails := omit,
nrOfGrpLoop := omit,
nrOfRangeLoop := omit,
execTime := omit,
entitiesFinished := omit,
customFinishCondition := omit
},
entityFinishConditions := {
nrOfExecStart := 7,
nrOfSuccesses := 6,
nrOfFails := 5,
customFinishCondition := omit
},
entityFinishActions := {},
tcFinishActions:={}
};
float tsp_cps := 3000.0
float tsp_execTime := 15.2;
integer tsp_nrOfEntities := 1000
float tsp_LGenBase_Test_timeout := 0.5
integer tsp_minNrOfEntities := 1000 // for tc_EPTF_LGenBase_Test_cpsTest4WeightedScenario_entityLimit
integer tsp_maxNrOfEntities := 10000 //& for tc_EPTF_LGenBase_Test_cpsTest4NotWeightedScenario_searchEntityLimit
integer tsp_nrOfRepeat := 3;
}
//ILog
//=========================================================================
// Data Types
//=========================================================================
type record of integer EPTF_ILog_Test_DBList;
type record of charstring EPTF_ILog_Test_LogStrList;
type record of EPTF_ILog_Test_LogStrList EPTF_ILog_Test_LogStrListRecords;
//=========================================================================
// Constants
//=========================================================================
const charstring c_ILog_testName := "ILog_Test";
const charstring c_ILog_behavName := "tc_EPTF_ILog_Test_activateListenersBehavior";
const charstring c_ILog_action := "tc_EPTF_ILog_Test_activateListeners_action";
const charstring c_ILog_entityType := "TestEntityTypeNameILog";
const charstring c_ILog_entityGroup := "eGroupNameILog";
const integer c_ILog_entityIdx1 := 0;
const integer c_ILog_entityIdx2 := 1;
const integer c_ILog_idxNonExist := 123;
const integer c_ILog_IList_err := -1;
type component EPTF_LGenBase_Test_CT extends EPTF_LGenBase_CT {
var integer v_myBCtxIdx:=-1;
var TestContexts v_behaviorContexts:={}
var boolean v_LGenBase_Test_genericEventListenerFunctionCalled:=false;
var boolean v_LGenBase_Test_genericEventListenerFunction2Called:=false;
var boolean v_LGenBase_Test_entityEventListenerFunctionCalled := false;
var boolean v_LGenBase_Test_entityEventListenerFunction2Called := false;
var boolean v_LGenBase_Test_DummyTestStep1Called:=false;
var boolean v_LGenBase_Test_DummyTestStep2Called:=false;
var boolean v_LGenBase_Test_DummyTestStep3Called:=false;
var boolean v_LGenBase_Test_trafficCaseStarted := false;
var boolean v_LGenBase_Test_trafficCaseStopped := false;
var boolean v_LGenBase_Test_trafficCaseAborted := false;
var boolean v_LGenBase_Test_entityStopped := false;
var boolean v_LGenBase_Test_entityAborted := false;
var boolean v_LGenBase_Test_groupFinishConditionFunctionCalled:= false;
var boolean v_LGenBase_Test_entityFinishConditionFunctionCalled:= false;
var integer v_LGenBase_Test_trafficCaseStartedCounter := 0;
var integer v_registerCounterSucc := 0;
var integer v_registerCounterFail := 0;
var EPTF_IntegerList v_LGenBase_Test_counters :={};
var charstring v_LGenBase_Test_actualPhase:="";
var boolean v_LGenBase_testFinished := false;
var integer v_dummyInt
var boolean v_dummyBool
var float v_dummyFloat
timer T_LGenBase_Test_guard
var EPTF_IntegerList v_EventReceived :={};
//ILog
var integer v_ILog_behavFail := -1;
var integer v_ILog_behavOK := -1;
var integer v_ILog_action := -1;
var integer v_ILog_listenerNot2CallIdx := -1;
var EPTF_ILog_Test_LogStrListRecords v_EPTF_ILog_Test_logItems := {{""}, {""}};
var EPTF_ILog_Test_DBList v_EPTF_ILog_Test_logItems_dbIds := {-1, -1};
var EPTF_ILog_Test_LogStrList v_EPTF_ILog_Test_loggedStr := {"", ""};
var integer v_ILog_checkIdx :=-1;
}
type EPTF_IntegerList TestContexts; //database model for test; generally i.item = record for i.entity; now: only a number
const charstring c_LGenBase_TemplateSubstitutionTest_Result := "This is a sample template about USERNAMEs.\r\nThe username_0012_a@uri.hu is my favorite user. \r\nI especially like username_0014_a@uri.hu if it is fresh.\r\nI especially like username_0010_a@uri.hu needs additional 0.\r\nI especially like username_0024_a@uri.hu if it is fresh.\r\nI especially like username_0006_a@uri.hu if it is fresh.\r\nI especially like username_0104_a@uri.hu needs one leading zeros less than original.\r\nI especially like username_10104_a@uri.hu overflow.\r\n\r\nThe username_0012_a@uri.hu is my favorite user again. \r\nHis myuserid seems okay to me.\r\nMy favorite spice is $(SPICE).\r\n";
const charstring c_LGenBase_extTemplate_dummyTemplate_Substitution_Result := "This is a sample template about FRUITs.\r\nThe APPLE is my favorite fruit. \r\nVegetables are healthy too, eat as much CARROT as you can.\r\nI especially like APPLE if it is fresh.\r\nDon't eat too much meat although TENDERLOIN is very tasty.\r\nMy favorite spice is PEPPER.\r\n";
const EPTF_LGenBase_TemplParamSubstList c_LGenBase_extTemplate_dummyTemplate_Substitution_Dictionary := {
{
paramName := "FRUIT",
paramValue := "APPLE"
},
{
paramName := "VEGETABLE",
paramValue := "CARROT"
},
{
paramName := "MEAT",
paramValue := "TENDERLOIN"
},
{
paramName := "SPICE",
paramValue := "PEPPER"
}
};
const charstring c_LGenBase_TemplateContentGetter_Dummy_Content := "Template content getter dummy result";
// functions and component that is needed to check expected warning messages
group CheckExpectedWarning {
type component EPTF_CLL_LGenBase_Test_ExpectedWarning_CT extends EPTF_Logging_CT {
var boolean v_LGenBase_Test_expectedWarningInitialized:=false;
var boolean v_LGenBase_Test_expectedWarningArrived := false;
var charstring v_LGenBase_Test_expectedWarningMsg:="";
}
} // group CheckExpectedWarning
}