TOOL ENVIRONMENT
IPSL
Continuous development Reusability of test cases for
and downward compatibility different test phases
IPSL
Independent Protocol Simulator Language
Components overview
IpslVersion 2.0;
IPS SUT Script Freephone;
Activated Locally;
IDP (S
rvK ey=42)
BeginScript
Put(Modify(Pool("IDP", MSG_Component))
ServiceKey := 42; // Freephone
SCI Simscript EndModify);
Send;
FCI
StartTimer(tWait,1000);
CON WaitFor Message(SCI);
WaitFor Message(FCI);
WaitFor Message(CON);
EndScript;
Script editor
User Simscript
to create a test case
The protocol specific
files are provided by the
tooling and known to the
tester.
Scripts Control file
Parser
Control file
IpslVersion 2.0;
SimulatorControlFile;
TestBlock
Resources = 0..127;
IdleTime = 3000;
On WakeupTimer
Start Freephone;
EndTestBlock;
Config file
[SIMULATION]
CTL_File=flow1.its
Layers=SINAP,TCP
[SINAP]
Monitor=2
[TCP]
Link0=R_IP=scp,R_PORT=6001
3 Component Portion
3.1 Invoke
-------------- BEGIN of statistic 1 (A)
3.1.1 Invoke ID
Statistic on A-side; Seiz/Fail
42 00000001 Invoke ID value : 1 (0x01)
----------------------------------------
A001=4711 1000
3.1.2 Local Operation
B001=9901 194
45 00000000 Operation Code : InitialDP
----------------------------------------
NUMBER OF CALLS : 1000
3.1.3 InitialDPArg
NUMBER OF FAILED CALLS : 194
3.1.3.1 ServiceKey
FAILURE RATE : 19.400%
50 ******** ServiceKey : 42 (0x2A)
NUMBER OF PENDING CALLS : 0
MAX SIMULTANEOUS CALLS : 64
3.1.3.2 CalledPartyNumber
IPSL INTERPRETER (error) 6 : 108
53 0------- Odd/Even Indicator : even number
IPSL CANCEL (error) 7 : 86
-0000011 Nature of Addr. Indicator : national number
AnsTim count min max aver Quant
54 0------- Internal Netw.No. Indic. : rout.2 internal netw.all.
Setup 892 100 1006 553 970
-001---- Numbering Plan Indicator : ISDN numbering plan
-------------- END of statistic 1
----0000 Spare : spare
55 ******** cld.pty.no. Address Signal : 9901
Script
• defines the message sequence for the whole dialog
• contains the modification of messages for sending and evaluation
of received messages
• can be executed in parallel depending on the number of
resources
Control file
• contains the loop invoking scripts
TestBlock
• Test blocks can expire by time ranges (TimeRange) or by
reaching a certain number of loop passes (Loop), default is
eternal
• Invocation of scripts by timer (WakeupTimer), message or key
• Combination of resources for parallel script execution
Protocol version
• name of protocol, e.g. Sinap7 Germany with a unique abbreviation scheme:
[Protocol group][Version][Subversion or Country] e.g. IN07DEU
Message pool
• set of message templates, at least one template per message type
• each template is identified with a specific name
• message templates are the origin for modifications by the script
Resource
• execution environment for an instance of a script
• stores local variables, instruction pointer and state information
• allows to handle multiple dialogs in parallel
Instructions
asynchronous event B
Eventhandler
Wait for event A for
continue waiting event B
Event A
Instructions
Instructions End
Integer
• value range depends on the used machine, actual 64
bit signed
String
• maximum length 231, binary strings are possible
Messages
• messages are stored as strings
• first character contains the 'message level'
• the message level defines the type of the message
and is needed for later modifications
Const
Constants str_const = "abc";
BeginScript
EndScript;
For internal use
18 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
IPSL – The Language
Scripts Files - Send Messages
• If/Else statement
If GetPar(ResultCode) = 2001 Then
PRINT("SUCCESS");
Else
PRINT("ERROR");
Cancel(ERROR, Reset);
EndIf;
• Executes the statements within the loop as long as the condition is true
Var
i : Integer;
BeginScript
...
i := 0;
While i < 10 Do
// Send a sequence of 10 update CCRs
Put(Modify(Pool("CCR", MSG_Universal)) /* |---- CCR --->| */
CCRequestType := 2 /* 2 = UPDATE_REQUEST */;
EndModify);
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
DELAY(1000);
i := i + 1;
EndWhile;
...
EndScript;
BeginSubScript WrongResultCode
// do some error treatment here
Put(Pool("STR", MSG_Universal)); /* |---- STR --->| */
Send;
WaitFor Message(STA); /* |<--- STA ----| */
EndScript;
IpslVersion 2.0;
Header
SimulatorControlFile;
Const
Constants duration = 20000;
TestBlock
Resources = 0..31;
On Message(CCR)
Test block Start Server;
EndTestBlock;
TestBlock
Resources Resources = 0..31;
Test block specification IdleTime = 1000;
On WakeupTimer
On clause Start Client(duration);
EndTestBlock;
For internal use
27 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
IPSL – The Language
Control Files - Test Blocks
• Resources
Resources = 0..127;
Resources = 1, 5, 7;
Resources = 0..10, 50..60;
• On clause
On Message(CCR)
On Key("A")
On WakeupTimer
On Expression(x = y)
On InternalMessage(InvokeData, "pattern")
SimulatorControlFile;
Var
rand : Integer;
RANDOM_VAR;
InitBlock
RANDOMIZE;
EndInitBlock;
TestBlock
Resources = 0;
IdleTime = 1000;
On WakeupTimer
RANDOM(rand, 1000);
PRINT("Random(0..999) = " & rand);
EndTestBlock;
TestBlock
Resources = 0..127;
CycleTime = 100;
On WakeupTimer
Distribution
By 2 // 25,0%
Start Script1;
By 5 // 62,5%
Start Script2;
By 1 // 12,5%
Start Script3;
EndDistribution
EndTestBlock
• String functions
i := Length("Hello"); // returns the length of a string, i=5
i := Val("1234"); // returns the numeric value of a string, i = 1234
s := Str(1234); // converts an integer into a string, s = "1234"
i := Ord("123"); // returns the ASCII code of the first char, i=$31
s := Chr($31); // converts an integer into an ASCII char, s = "1"
s := MidStr("1234567", 4, 2); // returns a substring, s = "45"
s := ParseString("1,2,3", ",", 2); // returns the nth element, s = "2"
Modify GetPar
Put
Value
Send buffer
• Select:
→ Menu Script
→ Command
→ Put message into buffer (to create a new message from the scratch)
→ or Add modify command (to append modify statements)
→ Choose an appropriate message from the message list (use the Show button to check
the message contents)
Example
Addressing parameters by their occurrence
ParameterB
// ParameterA in another structure
(optional)
Insert c_P_MessageArg.c_P_ParameterA;
ParameterA ParameterA(3) := z;
(optional)
Features:
• Standard Windows
Application
• Separate state
viewer for each
layer
• Trace viewer
showing messages
for each protocol
layer
• permanent view to
the main
simulation state
(actual count, load
and errors)
• Integrated
HTML help
∙ Resource is idle
∙ Resource is idle, WakeupTimer has expired but has not been delivered yet due to load control
Features:
• Online decoding of
sent or received
messages
• Decoding of messages
on different protocol
layers
• Discovering of wrongly
structured messages
• Colored view for an
easy orientation
• Uses the same
decoding functions as
the post processing
tool msg.exe
• Desktop
new IPSL Script Creates a new script with Simscript
new IPSL Control file Creates a new control file with Simscript
• .SCR
[filename] Starts Simscript with the actual protocol
compile Starts the script compiler IPSLC.EXE
configure context menus Configures the context menu
• .CTL
[filename] Starts Simscript with the actual protocol
compile Starts the script compiler IPSLC.EXE
configure context menus Configures the context menu
• .CFG
[filename] Starts the simulator IPS32.EXE
edit Starts notepad with the CFG file
configure context menus Configures the context menu
• .TRC
[filename] Decodes the trace file with MSG.EXE
decode call tickets* Decodes the call tickets with IT_PRINT.EXE
summarize call tickets* Decodes the call tickets with IT_SUM.EXE
configure context menus Configures the context menu
* currently under construction
IPS
Intermediate Layers
Access to the Internal
• optional - zero, one or more
configuration Messages • emulation of an intermediate protocol layer
file between scripts • enhancement of link specific functionality
Starting point:
• A simulator resource is the runtime environment to execute a script
• One simulator resource is capable to handle exactly one message flow
• The default number of resources is 128 in both Control File and IPS
RIPS ≤ 127: RCTL = RIPS
Requirement:
• Simulation of high load with long call duration
• Example: Required load is 1.000.000 calls per hour, each call is 90 sec
Number of resources = ( 1.000.000 / 3.600 ) * 90 = 25.000
Solution:
• IPS provides a configurable NumberOfResources in the configuration file
• IPS Resources above 127 without a direct representation in the control file
will be mapped as following:
RIPS > 127: RCTL= (RIPS mod 64) + 64
For internal use
48 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
IPS – Internal Architecture
Increasing the number of simultaneous calls
NumberOfResources
128 192 256 320 or any NumberOfResources
• Load test with 100 calls per sec, each call 5 min. Please calculate required number of resources.
[Simulation]
NumberOfResources=________
• A complex test case requires a scalable number of resources for four different TestBlocks as shown
below. Please fill in the right resource specification of the TestBlocks.
Script A
Script D
Script B Script C
TestBlock TestBlock TestBlock TestBlock
Resources=_________; Resources=_________; Resources=_________; Resources=_________;
IdleTime = 1; IdleTime = 1; IdleTime = 1; IdleTime = 1;
On WakeupTimer On WakeupTimer On WakeupTimer On WakeupTimer
Start ScriptA Start ScriptB Start ScriptC Start ScriptD
EndTestBlock; EndTestBlock; EndTestBlock; EndTestBlock;
Script 2
Msg 5
Inter Script
Communication to Msg 6
trigger Script 2
A IM InvokeData B
Origination Pattern Data
Control File:
On InternalMessage(InvokeData, "MyPattern")
or Script:
WaitFor InternalMessage(InvokeData, "MyPattern);
IM Data
Origination Destination Data
Script:
WaitFor InternalMessage(Data)
For internal use
53 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
Inter Script Communication Example
A IM InvokeData B
IM Data
WaitFor InternalMessage(Data);
orig := InternalMessageOrigination();
InternalCancelOnError(orig, On);
IM Cancel
Script cancellation Automatic script cancellation
due to some error due to IM Cancel message
A IM InvokeData B
undelivered IM-InvokeData
Config File:
[Simulation]
CancelOnDiscardedInternalMessages=1
IPS 1
ExternalChannel=TCP,a,localhost,b
SendInternalMessage(InvokeData, “MyPattern“, ““);
WaitFor InternalMessage(Data); InvokeData:
"MyPattern"
Data: PC2: IP = y
"Hello"
IPS 3
ExternalChannel=TCP,c,x,a
WaitFor InternalMessage(InvokeData, “MyPattern“);
SendInternalMessage(Data, InternalMessageOrigination(), “Hello“);
WakeupTimer
Number
Numberofof Reduced
Reducednumber
numberofof
WakeupTimer
WakeupTimer WakeupTimer
WakeupTimer
generated
generatedper
per delivered
deliveredby
byLoad
Load
Resource
Resource Control
Control
Resources
WakeupTimer
• Generation per resource
• CycleTime (or Load*) Run
• IdleTime Load Control
Scripts
ExcludeWakeupTimerFromLoadControl
•• Step/Quantity
Step/Quantity
* Alternatively to CycleTime also Load per •• BHCA
BHCA
Resource can be used:
•• CPS
CPS
Load [BHCA] = 3.600.000/CycleTime [ms]
[Simulation]
LoadCtrlQuantity=1 ; one call
LoadCtrlStep=1000 ; per second
or
or
SET_LOAD_CTRL(step,quantity)
SET_LOAD_CTRL_BHCA(bhca)
SET_LOAD_CTRL_CPS(cps)
• provides speech
channel functions to
the IPS
• supports RTP
endpoints or PCM
bearer channels
based on NMS
CG6000 card
• 1kHz tone
generation
• DTMF generation
and detection
Database (IPSLDB)
• Querying and
sending values from
a CSV-database
• Database values
are sent back to the
invoking IPSL script
• Supports access to
multiple databases
Example
Mobile Phone (Handy)
Online-Statistic
Built in data Counter
collection
Data that is collected without the help of the test case script:
• Number of locally or remotely initiated calls
• Number of failed calls (again separately for locally or remotely
initiated calls)
• Additionally errors are counted separately for event type, script name
and line number
• Script name and start time are added to the call ticket as well as error
information when the script fails
• Number of send and receive messages and bytes per lower layer
• Layer specific counter
There are two options for the Start command that control how
the online statistic treats the script:
Start ... With Options <options>
• NoStatistic: Don’t count this script as a call.
• CallTicket: Automatically open a call ticket for this script.
Measurements:
2013-11-01_21:35:35|M|MOC call setup|75|36725|12|947|0|…
Counter:
2013-11-01_21:35:35|C|MOC|83
For internal use
76 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
Online-Statistic
Erase statistic
Since not all databases are deleted at once there may be small
inconsistencies when done while calls are running.
It is recommended to avoid clearing the statistic during a long
duration test but use differences instead.
Example
Var
• CT_UserData, <tag>, <value>
tStart : Integer; Put some data into the call ticket, do this
whenever data that is important for the
BeginScript
Statistic(CT_Open);
evaluation of the call is available.
Command Set:
• Header
• Counter
• Statistics
• Resource state
• Link state
• Run mode
• Load control
• Send key
• SimVar
• Exit
• Quit
• Help
• Low network traffic • Main IPS control commands
• Any Telnet client can be used • Special Clients are available
Protocol 1
Protocol n
“CIR”
3.1.1.1 RequestedInformationType
16 00011110 RequestedInformationType : ReleaseCause
3.1.1.2 RequestedInformationValue
• Protocol is IN07mp
3.1.1.2.1 ReleaseCauseValue
21 1------- Extension Indication 1 : last octet
-00----- Coding Standard : CCITT standard
---0---- Spare : spare
----0010 Location : public netw. serv.local user
3.1.3.2 RequestedInformationValue
3.1.3.2.1 CallStopTimeValue
42 ******** CallStopTimeValue : 29.03.06 - 14:42:15
3.1.4 RequestedInformation
3.1.4.1 RequestedInformationType
52 00000010 RequestedInformationType : CallConnectedElapsedTime
3.1.4.2 RequestedInformationValue
3.1.4.2.1 CallConnectedElapsedTimeValue
57 00111101 CallConnectedElapsedTimeValue: 61 (0x3D)
• Configured Layer
SCN -0 -0 : MAP Scenario, D.Hanisch, %in_scn % 14 14:44:21.57
TIM -0 -0 : LoadCtrl: St=3000 Qu=1 Du=0 14 14:44:21.57
NULL : Null-Lower-Layer D.Hanisch %null_ll % 14 14:44:21.57
BeginScript
/* MSC Number */
EXT_Msc_2Dh_Number := 1;
NADI_Msc_2Dh_Number := 1;
NPL_Msc_2Dh_Number := 1;
ADDR_Msc_2Dh_Number := "49179423";
EndModify);
EndScript;
The INAP/MAP simulation layer provides a lot of automatic features for the
script writer. The goal is to keep the scripts simple, clear and safe:
• Chooses the TCAP message type: the first message is sent as BEGIN all
following as CONTINUE
• Manages the transaction and operations
• Answers dialog requests: per default sends a DialogAccept with the same
ApplicationContextName as reaction on a DialogRequest
• This means: Outgoing scripts setup the DialogRequest, in terms of
incoming DialogRequests scripts don’t have to do anything.
• Adds a DialogAbort to a UserAbortInfo from the script if the dialog was
created with DialogRequest
• Aborts the TCAP transaction on script failure
There are ways to overcome the automatics, e.g. for robustness tests:
SSN=x SSN=y
TCP/IP
Tester
OMNI
SPC=spc, IPAddr=ip
[TCP]
Link0=R_IP=ip,R_PORT=p
www.nmss.com
Tester
OMNI
4 E1 interfaces
IPS config file:
32 Links
[SIMULATION]
Layers=MAP,TX3000 MTP 1-3 on board
[TX3000]
Link0=spc
IPAddr=ip OMNI
[SIMULATION]
Layers=MAP,TCP
[TCP]
Link0=R_IP=ip,R_PORT=p
TX3220/TX4000
Dual/Quad T1 (1.544Mbps)
or E1 (2.048Mbps) interface
Up to 16/32 SS7 links per
board
PCI bus, driver available for
WinNT, Win2000 and XP
• IPS with TX-boards is an adequate and powerful SS7 simulator for load,
stress and feature tests
• IPS can directly run on the PC, where the TX-board is built in (TX-host).
Recommended for load tests
• For sharing the TX-board for a group of remote working testers the IPS
can be connected by TCP/IP to the TX-host via the TGW (TX-Board
Gateway)
TCP Layer
1.2 RequestURI
12 ******** RequestURI : http://158.226.200.63:9210
1.3 HTTPVersion
40 ******** HTTPVersion : HTTP/1.1
2 GeneralHeader
2.1 Connection
52 ******** Connection : keep-alive
3 RequestHeader
3.1 AcceptCharset
66 ******** AcceptCharset : iso-8859-1,*,utf-8
3.2 Host
86 ******** Host : 158.226.200.63:9210
4 RequestFilename
107 ******** RequestFilename : rt-1.xml
1.2 StatusCode
16 ******** StatusCode : 200
1.3 ReasonPhrase
21 ******** ReasonPhrase : OK
2 GeneralHeader
2.1 Connection
27 ******** Connection : Keep-Alive
3 EntityHeader
3.1 ContentLength
41 ******** ContentLength : 547
3.2 ContentType
46 ******** ContentType : text/xml; charset=UTF-8
4 CookieNo
71 ******** CookieNo : 0 (0x00)
5 HtmlPageExtract
5.1 HtmlTitle
5.2 HtmlHrefNo
78 ******** HtmlHrefNo : 0 (0x00)
5.3 HtmlImgNo
81 ******** HtmlImgNo : 0 (0x00)
5.4 HtmlFormNo
84 ******** HtmlFormNo : 0 (0x00)
For internal use
101 5.5 Inc.HtmlFrameNo
© Copyright Redknee 2013 Presentation and Training Back to Overview
87 ******** HtmlFrameNo : 0 (0x00)
HTTP Simulation
REPLACE_MSG_PART1(beg,end,occ,val)
beg [input]: fix string to search (begin)
end [input]: fix string to search (end)
occ [input]: occurence from 'beg'
val [input]: fix new string between 'beg' and 'end'
REPLACE_MSG_PART2(old,new)
old [input]: fix string to replace (patch)
new [input]: fix new string
CHECK_MSG_PART(str_beg,str_val,str_end,monitor_level)
str_beg [input]: fix string to search (begin)
str_val [input]: string to check between 'str_beg' and 'str_end'
str_end [input]: fix string to search (end)
m._level[input]: if check faild and 'monitor_level' > 0 monitor received message
EXIST_MSG_PART(str,monitor_level)
str [input]: string to check (exist 'str' in received message)
m._level[input]: if check faild and 'monitor_level' > 0 monitor received message
GET_MSG_PART(str_beg,str_val,str_end)
str_beg [input] : fix string to search (begin)
str_val [output]: val string (result) between 'str_beg' and 'str_end'
str_end [input] : fix string to search (end)
GET_MSG_PART1(beg,end,occ)
simulator function with return value (string; between 'beg' and 'end')
beg [input] : fix string to search (begin)
end [input] : fix string to search (end)
occ [input] : occurence from 'beg'
GET_RESP_TAG_ATTRIB_VAL(rest,attrib,value)
rest [input] : fix string (response tag) to search
attrib [input] : fix string (attribute name) to search
value [output]: val string (attribute value) to return (result)
• The HTTP simulation layer has some built-in features to support XML over
HTTP.
• The body of a HTTP request or response is a XML structure.
• The XML to be sent is stored in a file, the request ASN.1 message
contains the name of this file
• The simulator reads the file and adds it as body to the HTTP message.
• For load test, the files are cached
• Files may be stored in a central location, path is given in the cfg file:
[HTTP]
FPath=<path>
• The body may be modified in the send buffer before being sent
Example
from/to script }
ttpResponseInformation ::= SEQUENCE {
statusCode [0] IA5String OPTIONAL,
<wsdl:message name="ExecuteCommandRequest"> statusPhrase [1] IA5String OPTIONAL,
<wsdl:documentation>TBD</wsdl:documentation> location [2] IA5String OPTIONAL
<wsdl:part name="request" element="xsd1:CommandRequestData" /> }
</wsdl:message> HttpHeader ::= IA5String
<wsdl:message name="ExecuteCommandResponse"> AdditionalHttpHeader ::= SEQUENCE OF HttpHeader
<wsdl:documentation>TBD</wsdl:documentation> SoapHeader ::= CHOICE {
<wsdl:part name="response" soapHeaderText [0] IA5String,
element="xsd1:CommandResponseData" /> soapHeaderFile [1] IA5String
</wsdl:message> }
2.1.2.1.2.1.2 BooleanParameter_Value
55 00000001 BooleanParameter_Value : TRUE
Send;
WaitFor Message(ExecuteCommandResponse); /* |<--- ExecuteCommandResponse ----|
*/
EndScript;
– CallId
Provided by the SimulationLayer and used to route messages to
resources
– CSeq
Provided for requests and mirrored in responses. There is a stack
of two open request for mirroring CSeq, e.g. INVITE and PRACK
or INVITE and CANCEL
– Route / Record-Route
Record-Route mirrored in response. Route built up from Record-
Route on client and server
– Via
Calculated from data from lower layer. Automatically knows about TLS and
SigComp.
– 100rel
Add RSeq and RAck to response or PRACK
– Authentication
Calculate and add authentication data. Available Schemes: HMAC, Digest,
Kerberos
• Error handling
– The SimulationLayer will send error responses for receives requests if
the script does not, e.g. due to an error
– The SimulationLayer will send ACK for received responses on INVITE
if the script does not
• Protocol test
– All automatics by the SimulationLayer may be overridden
– Header provided by the script are taken as they are
– Provide empty header to suppress the header in the message
– Free header may be send through the TransparentHeader
– Short header are supported
• RETR_WasRetransmit
– May be cleared from script ( := 0)
– After response is received contains the number of retransmission of
the request
*handled by IPS
Version Message Length* dynamically
Flags Command Code static parameters
Header Application ID
Hop-By-Hop ID*
End-To-End ID*
Payload AVPs
AVP Code
Flags AVP Length*
Vendor ID (optional)
Features:
• Generic SimulationLayer used by all Diameter protocol versions
• Diameter session handling: messages sent or received by a script have
the same Session-ID (structure: "origHost;sysBootTime;sessionCounter")
• Supports both client and server simulation
• Built in handling of Hop-By-Hop-ID and End-To-End-ID
• Automatic replies to messages CER, DPR and DWR
• Support of EAP-SIM, EAP-AKA and EAP-AKA’
Currently supported Diameter interfaces:
Gy/Ro/Rf 3GPP 32.299 Wx 3GPP 29.234 SWx 3GPP 29.273
Gq 3GPP 29.209 S6a 3GPP 29.272 Zh 3GPP 29.109
Gx 3GPP 29.212 S6b 3GPP 29.273 Cx/Dx 3GPP 29.229
Rx 3GPP 29.214 S9 3GPP 29.215 Re 3GPP 32.296
Sh 3GPP 29.329 STa 3GPP 29.273
Example
DIACX IntermediateLayer
CapabilityExchangeRequest (InbandSecurity=1)
CapabilityExchangeAnswer DIACX-Layer
Client Server
BindRequest (MsgID n)
BindResponse (MsgID n)
TCP Layer
LDAP SimulationLayer
Features:
• Full support of all protocol messages and their parameters as specified in
ASN.1 - BUT without a real database in the background
• Supports both client and server simulation
• Built in handling of MessageID
• Simplified notation of the LDAP search filter according to RFC 2254
• Built in tracing of Bind/Unbind operations accessible e.g. in Control Files
• Different modes to control the link establishment method
• Support of LDAP over TLS using the extended request StartTLS
Requires Intermediate Layers SEC and LDAPS
Client Server
ExtendedRequest-StartTLS
ExtendedResponse-StartTLS LDAPS-Layer
• LinkStartMode
• Configures the link start mode and the resource to link assignment
• "Automatic":
• Links will be established automatically at simulator start
• Links are shared between all IPS resources
• "PerSession":
• Links will be established on first request to send a message
• Links will be closed at end of script
• Links and IPS resources are assigned 1:1
• "Manual":
• Links will be controlled from the script by SimVars
LDAP_ActLink and LDAP_DctLink
• Links and IPS resources are assigned 1:1
[LDAP]
LinkStartMode=Automatic ; or PerSession or Manual
• LDAP_BindState
• Returns the actual state of Bind operations
• BS_UnBound: It is required to perform a Bind operation on this link
first
• BS_Binding: There is a Bind operation in progress. Another Bind
operation should not be performed on this link
• BS_Bound: Any LDAP operation such as SearchRequest or other
can be performed
TestBlock
Resources = 0;
IdleTime = 1000;
On WakeupTimer
If LDAP_BindState = BS_UnBound Then
Start ClientBind; // Perform Bind operation
ElsIf LDAP_BindState = BS_Bound Then
Start ClientSearch; // Do any LDAP operation
EndIf;
EndTestBlock;
Example
Important Simulator Variables
• LDAP_Filter
• Filter is a complex and recursive structure in ASN.1 of operation
SeachRequest
• NOT accessible by common methods like Modify or GetPar
• Always use SimVar LDAP_Filter for write access (before Put) or
read access (after WaitFor)
• LDAP_Filter uses the syntax as defined in RFC 2254
WaitFor Message(SearchRequest);
PRINT(LDAP_Filter);
// -> "(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))"
• For test automation it is important to terminate the IPS from the script or control
file. This terminates the IPS:
– IPS_RunMode := 2;
• By default the IPS has 30 sec to end all open calls and will then terminate. This
time may be changed in the cfg:
– [Simulation]
ShutDownWaitTime=<time in ms>
ShutdownIfIdle=1
• In case of missing supervision timers in scripts the IPS might wait eternally. This
can be prevented by a global timer in the cfg:
– [Simulation]
RunTimeDuration =<time in ms> ; or RunTimeRange
• In case of an error the IPS will wait for a user reaction. This may be changed by:
– [Simulation]
ExitOnError=1
• Other useful value for regression test:
– [Simulation]
ShowTopmost=0
InServiceTimeout=0
For internal use
138 © Copyright Redknee Inc. 2013 Presentation and Training Back to Overview
Test automation
Evaluating the test
• For a regression test the execution status (success, fail) “Don’t try to
of each test must be recorded
catch all errors
• Usually the test script writes the result to the trace file. A and write a
post process then checks for this result negative result.
• Note: in general it is not possible to write a negative result This will always
to the trace! be incomplete.
• A secure way is to write a “TestOK” message at the end Let the simulator
of the script. The absence of this means the test has do this for you.”
failed.
...
BeginScript
TCres := 0;
// do something ...
TCres := 1; // we have reached EndScript -> OK
EndScript;
ResourceVar
res : Integer;
...
On WakeupTimer
Start Test(res, ...);
If res = 1 Then
Print(“TEST OK”);
EndIf;
• You may also evaluate the statistic of the IPS For this method
to learn if all calls were OK no prints in the
script are
PORT-7
PORT-7
-0
-0
-0
-0
:
:
-------------- BEGIN of statistic 1 (A)
Statistic on A-side; A=...Seiz/B=...Fail
19
19
16:47:59.52
16:47:59.52 necessary, so it
PORT-7 -0 -0 : S...= IN >1s IN >2s IN >5s ACG 19 16:47:59.52
PORT-7
PORT-7
-0
-0
-0
-0
:
:
----------------------------------------
A001=~ 1
19
19
16:47:59.52
16:47:59.52 may be applied
PORT-7 -0 -0 : B001=~ 0 19 16:47:59.52
PORT-7
PORT-7
-0
-0
-0
-0
:
:
S001= 0 0 0
----------------------------------------
0 19
19
16:47:59.52
16:47:59.52
for load tests
PORT-7 -0 -0 : FAILURE RATE : 0.00 % 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF NOT FAILED CALLS: 1 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF FAILED CALLS : 0 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF CALLS OUT. STAT.: 0 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF PENDING CALLS : 0 19 16:47:59.52
PORT-7 -0 -0 : -------------- END of statistic 1 19 16:47:59.52
PORT-7 -0 -0 : -------------- BEGIN of statistic 2 (B) 19 16:47:59.52
PORT-7 -0 -0 : Statistic on B-side; A=...Seiz/B=...Fail 19 16:47:59.52
PORT-7 -0 -0 : ---------------------------------------- 19 16:47:59.52
PORT-7 -0 -0 : ---------------------------------------- 19 16:47:59.52 Total number of calls = 1
PORT-7 -0 -0 : FAILURE RATE : 0.00 % 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF NOT FAILED CALLS: 0 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF FAILED CALLS : 0 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF CALLS OUT. STAT.: 0 19 16:47:59.52
PORT-7 -0 -0 : NUMBER OF PENDING CALLS : 0 19 16:47:59.52
PORT-7 -0 -0 : -------------- END of statistic 2 19 16:47:59.52
PORT-7 -0 -0 : SEZ:00000000001 ERR:00000000000 0.000% 19 16:47:59.52
PORT-7 -0 -0 : O :00000000001 ERR:00000000000 0.000% 19 16:47:59.52
PORT-7 -0 -0 : I :00000000000 ERR:00000000000 0.000% 19 16:47:59.52 Number of failed calls = 0
PORT-7 -0 -0 : -------------- BEGIN of statistic (T) 19 16:47:59.52
PORT-7 -0 -0 : Link D Bytes Msg's Bytes/s Msg's/s 19 16:47:59.52
PORT-7 -0 -0 : 0 O 413 1 0 0 19 16:47:59.52
PORT-7 -0 -0 : 0 I 650 1 0 0 19 16:47:59.52
PORT-7 -0 -0 : -------------- END of statistic (T) 19 16:47:59.52
Example test
suite in TSM
It is followed by
the IPS
execution,
decoding of the
trace files and
the evaluation of
the decoded
trace files.
Example
Exercise
Exercise
• Configuration in ips.cfg
– Link<n> = L_IP=<ip-address>, ...
• To have much more addresses the RSS (Remote Socket Server) was
developed
• It uses a Linux PC as socket implementation
• A special process (RSS) runs on the Linux PC
• The IPS connects to the RSS via one (1) TCP connection
• The RSS may implicitly be a router to separate workstation network and
test network
RSS
• Configuration in IPS
– Layers={SimulationLayer}, RS, TCP
– Configuration of RS as before TCP
– Configuration of TCP: one link to RS
• Installation
• Network: http://in.bln1.bf.nsn-intra.net/IN-TEST-SW/ipslserver.htm
• Local: http://in.bln1.bf.nsn-intra.net/IN-TEST-SW/ipsltools.htm
• IPSL FSpec - language specification
• %toolpath%\online.hlp\ipslfspec\ipsl-fspec-02.doc
• IPS online help - description of the specifics for each layer (function,
configuration, simulator variables)
• %toolpath%\online.hlp\ips32.htm
• F1 within IPS
• Description of the simulator extensions
• %toolpath%\online.hlp\handy\index.htm
• %toolpath%\online.hlp\ipsldb\ipsldb.doc
• %toolpath%\online.hlp\ipsltiu\index.htm
Slide IPS – Internal Architecture (Increasing the number of simultaneous calls – Exercise)
Load test with 100 calls per sec, each call 5 min. Solution: 100 * 300 = 30.000
[Simulation]
NumberOfResources=30000
TestBlock resource assignment to meet the red marked resource groups in IPS
TestBlock TestBlock TestBlock TestBlock
Resources= 0..31; Resources= 64..95; Resources= 32..47, 96..111; Resources= 48..63, 112..127;
IdleTime = 1; IdleTime = 1; IdleTime = 1; IdleTime = 1;
On WakeupTimer On WakeupTimer On WakeupTimer On WakeupTimer
Start ScriptA Start ScriptB Start ScriptC Start ScriptD
EndTestBlock; EndTestBlock; EndTestBlock; EndTestBlock;