Sie sind auf Seite 1von 156

IPSL

TOOL ENVIRONMENT

For internal use


© Copyright Redknee Inc. 2013 Presentation and Training
Overview

• Introduction • INAP/MAP Simulation


• IPSL Workflow • HTTP Simulation
• IPSL – The Language • SOAP Simulation
• Accessing Messages • SIP Simulation
• IPS Graphical User Interface • Diameter Simulation
• IPS Internal Architecture • LDAP Simulation
• Inter Script Communication • Test Automation
• IPS Load Generation • Performance tests
• Simulator Extensions • Multiple IP addresses
• Online-Statistic • Organizational matters
• Remote Testing
• Debugging test cases

For internal use


2 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Introduction
Motivation

Easy to learn script language instead of


native programming

Same tool for different Test automation and


interfaces evaluation

IPSL
Continuous development Reusability of test cases for
and downward compatibility different test phases

Same tool for different test phases, e.g.


functional, load and robustness test

For internal use


3 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Introduction
Why is IPSL independent?

INAP MAP BSSAP HTTP SIP RADIUS MEGACO

CAP ISUP CORBA LDAP SNMP DIAMETER (more...)

IPSL
Independent Protocol Simulator Language

K1297 ISTS IPS


Independent Protocol
(legacy) (legacy)
Simulator

For internal use


4 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Introduction
 Back to Overview

Components overview

IPSL Creation of test cases


• Script editor and debugger SIMSCRIPT
Tool Environment • Script compiler IPSLC

Execution of test cases


• Protocol simulator IPS
• Mediation applications (IGW, OGW, TGW)
• Simulator extensions (IPSLDB, Handy,
IPSLTiu)

Evaluation of test cases


• Message decoder MSG
• Statistic tools

For internal use


5 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Workflow
From the message flow to the script

Message Flow IPSL Script


(simple free phone service) (freephone.scr)

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;

For internal use


6 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Workflow
Simscript editor with integrated script debugger

For internal use


7 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Workflow
Compilation step

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

Msg- Msg- Macros


Pool format
Tooling IPSL Compiler
C-Preprocessor

Parser

Coder 1 ... Coder n

compiled script for the


used simulator type ...

execution of the script on


Hardware the specific hardware
IPS
...
Simulator 1 Simulator n

For internal use


8 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Workflow
Running the test case

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

For internal use


9 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Workflow  Back to Overview

Test case evaluation


Example

Message decoder MSG Statistics

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

For internal use


10 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Design guidelines

• The test case should be recognizable from the script.


– Short scripts (approx. 1 page)
– Default procedures are handled by the simulator
– Message templates
• Flexible combination of test cases
– Call- and load mix
– Regression tests
• Test evaluation is part of the script
– Examination of message parameters
– Response time measurement

For internal use


11 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Script and Control files

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

For internal use


12 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Terms

Protocol version
• name of protocol, e.g. Sinap7 Germany with a unique abbreviation scheme:
[Protocol group][Version][Subversion or Country] e.g. IN07DEU

Message building system (MBS)


• formal description of all messages for a specific protocol version
• provides read/write access to message parameters and information elements

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

For internal use


13 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Flow control

Instructions
asynchronous event B
Eventhandler
Wait for event A for
continue waiting event B
Event A

Instructions

unexpected Because there is no event


Wait for event C event D handler for event D
the script is canceled with
an error
Event C

Instructions End

For internal use


14 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Data types

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

For internal use


15 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Instructions used in scripts

1 IpslVerson 2.0; IPSL Instructions


1 Script Freephone(sk : Integer);
1 Activated Locally;
1 Const
1 Var 1. Script skeleton
6 dra : String;
1 BeginScript 2. Modifying and sending messages
2 Put(Modify(Pool(“IDP”, MSG_Component))
2 ServiceKey := sk; 3. Receiving messages
2 EndModify);
2 Send; 4. Local event handler
5 StartTimer(tWaitAnswer, 1000);
3 WaitFor Message(CON)
5. Timer supervision
4 LocalEventHandler 6. Access to received parameters
4 HandleEvent Message(FCI)
4 EndHandleEvent; 7. Branch
4 EndLocalEventHandler;
5 StopTimer(tWaitAnswer); 8. Script cancellation
6 dra := GetPar(ADDR_CalledPartyNumber);
7
8
If dra <> “4711” Then
Cancel(ERROR, Reset);
9. Global event handler
7 EndIf;
1 EndScript;
9 HandleEvent Message(SCI)
9 EndHandleEvent;

For internal use


16 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Instructions used in Control Files

1 IpslVerson 2.0; IPSL Instructions


1 SimulatorControlFile;
1 Const
4 sk_freeph1 = 41;
7 sk_freeph2 = 42; 1. Control file skeleton
7 sk_freeph3 = 43;
2 TestBlock 2. Test block
2 Resources = 1..127;
3 IdleTime = 100; 3. Trigger by timer
5 Loop = 100;
6 TimeRange = Relative 00:01:00 For 02:00:00; 4. Starting a script
3 On WakeupTimer
7 Distribution
5. Loop
7 By 20
4 Start Freephone(sk_freeph1);
6. Time range
7 By 30
7 Start Freephone(sk_freeph2); 7. Distribution
7 By 50
7 Start Freephone(sk_freeph3); 8. Test block triggered by key event
7 EndDistribution;
2 EndTestBlock;
9. Start options
8 TestBlock
8 Resources = 0;
8 On Key(“s”)
8 Start Statist(STAT_ALL, 10)
9 With Options NoTickets + NoStatistic;
8 EndTestBlock;
For internal use
17 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Body

IPSL Version IpslVersion 2.0;


Script name
Script Name Script Name( must be the
• Argument by value prm1 : String; same as the file
• Argument by reference var prm2 : Integer name w/o
extension
);
Activation Types:
Activation Event Activated Locally;
• Locally
• By Message
Var
• By InternalMessage
Variables str_var : String;
int_var : Integer;

Const
Constants str_const = "abc";

BeginScript

Main Script // Statements

EndScript;
For internal use
18 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Send Messages

• Sending a modified message from the pool (mostly used method)


Put(Modify(Pool("CCR", MSG_Universal)) /* |---- CCR --->| */
CCRequestType := 1 /* 1 = INITIAL_REQUEST */;
EndModify);
Send;

• Sending an unmodified message from the pool


Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;

• Sending an unmodified byte string (e.g. from a capture file)


DWR_HEX := "\x01\x00\x00\x24\x80\x00\x01\x18\x00\x00\x00\x00\x00\x00" &
"\x00\x00\x1C\x71\x45\xFC\x00\x00\x01\x08\x40\x00\x00\x08" &
"\x00\x00\x01\x28\x40\x00\x00\x08";

Put(Modify(Chr(MSG_Universal) & DWR_HEX, MSG_Universal, DWR)


OriginHost := "myhost";
EndModify);
Send;

For internal use


19 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Wait for Messages

• Wait for a specific message (mostly used method)


WaitFor Message(CCR); /* |<--- CCR ----| */
If IsParPresent(CCRequestType) Then
PRINT("Received CCRequestType=" & GetPar(CCRequestType));
EndIf;

• Wait for a specific message with condition


WaitFor Message(CCR, GetPar(CCRequestType) = 1); /* |<--- CCR ----| */

• Wait for a message from a list of messages


WaitForEventSet
Case Message(CCR, GetPar(CCRequestType) = 1) /* |<--- CCR ----| */
// Do something
EndCase;
Case Message(CCR) /* |<--- CCR ----| */
EndCase;
Case Message(DWR) /* |<--- DWR ----| */
EndCase;
EndWaitForEventSet;

For internal use


20 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Wait for other events

• Wait for a Timer


WaitFor Timer(myTimer);

• Wait for InternalMessages


WaitFor InternalMessage(InvokeData, "myPattern")
WaitFor InternalMessage(Data)
WaitFor InternalMessage(Data, a = b)
orig := InternalMessageOrigination();
data := InternalMessageData();

• Wait for a Key


WaitFor Key("A")
PRINT("Key A pressed, data=" & KeyEventData());

• Wait for an Expression


WaitFor Expression(a = b)

For internal use


21 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Timer

• Timer used to supervise the arrival of an event (mostly used case)


StartTimer(WaitCCA, 3000); // time in msec
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
StopTimer(WaitCCA);

• Timer used delay script execution


StartTimer(Delay, 10*SEC); // also available as DELAY(time) macro
WaitFor Timer(Delay);

• Implicit stopped timer at EndScript


BeginScript
StartTimer(ScriptTimeout, 30*SEC); // supervises the whole script
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
EndScript; // <-- all timer will be stopped here

For internal use


22 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Event Handler

• Local event handler (multiple handler possible)


WaitFor Message(CCA) /* |<--- CCA ----| */
LocalEventHandler
HandleEvent Message(DWR) /* |<--- DWR ----| */
Put(Pool("DWA", MSG_Universal)); /* |---- DWA --->| */
Send;
EndHandleEvent;
EndLocalEventHandler;

• Global event handler (multiple handler possible)


BeginScript
...
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCR) /* |<--- CCR ----| */
...
EndScript;

HandleEvent Message(DWR) /* |<--- DWR ----| */


Put(Pool("DWA", MSG_Universal)); /* |---- DWA --->| */
Send;
EndHandleEvent;

For internal use


23 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts and Control Files - Branches
• Single If statement
If GetPar(ResultCode) = 2001 Then
PRINT("SUCCESS");
EndIf;

• If/Else statement
If GetPar(ResultCode) = 2001 Then
PRINT("SUCCESS");
Else
PRINT("ERROR");
Cancel(ERROR, Reset);
EndIf;

• If/ElsIf/Else statement (avoids nested Ifs)


If GetPar(ResultCode) = 2001 Then
PRINT("SUCCESS");
ElsIf GetPar(ResultCode) = 2002 Then
PRINT("LIMITED_SUCCESS");
Else
PRINT("ERROR");
Cancel(ERROR, Reset);
EndIf;

For internal use


24 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts and Control Files - Loops

• 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;

For internal use


25 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts Files - Subscripts

• Subscripts are used to change the actual test flow


• There is no return to the origination of the call (like "call")
• A GotoSubScript from a event handler cancels the actual WaitFor
BeginScript
...
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
If GetPar(ResultCode) = 2001 Then
GotoSubScript WrongResultCode;
EndIf;
...
EndScript;

BeginSubScript WrongResultCode
// do some error treatment here
Put(Pool("STR", MSG_Universal)); /* |---- STR --->| */
Send;
WaitFor Message(STA); /* |<--- STA ----| */
EndScript;

For internal use


26 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Control Files - Body

IpslVersion 2.0;
Header
SimulatorControlFile;

Global variables Var

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;

• Test block specification


TimeRange = (Absolute | Relative) start (To | For) end
CycleTime = 1000; // in msec
IdleTime = 50; // in msec
Load = 3600; // in BHCA
ExcludeWakeupTimerFromLoadControl;
ActiveWithoutLink;
Loop = 100;

• On clause
On Message(CCR)
On Key("A")
On WakeupTimer
On Expression(x = y)
On InternalMessage(InvokeData, "pattern")

For internal use


28 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language Example

Control Files - Validity of Test Blocks


IpslVersion 2.0;
• Test Blocks are valid eternally SimulatorControlFile;
(default)
TestBlock
• The validity can be restricted by: Resources = 0;
IdleTime = 1000;
• TimeRange specification or TimeRange = Relative 00:00:10;
• Loop specification Loop = 1;
On WakeupTimer PRINT("TB 1");
• Restricted validity allows a EndTestBlock;
resource to change its actual Test
TestBlock
Block Resources = 0;
• Once a Test Block became invalid IdleTime = 1000;
Loop = 1;
a resource searches for the next On WakeupTimer PRINT("TB 2");
valid Test Block according to its EndTestBlock;
presence in the control file
TestBlock
Resources = 0..3;
IdleTime = 1000;
Exercise:
Loop = 4;
In which order Resource 0 does its On WakeupTimer PRINT("TB 3");
print in this example? EndTestBlock;

For internal use


29 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language Example

Control Files - Init Blocks


• Init blocks can be used to initialize global variables
• Example: Init block initializes the RANDOM macro
IpslVersion 2.0;

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;

For internal use


30 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language Example

Control Files - Resource specific Init Blocks and ResourceVar

• Resource specific Init Blocks IpslVersion 2.0;


SimulatorControlFile;
should be used to initialize
variables which exist per ResourceVar
resource, e.g.: msisdn : String;

• Variables declared as InitBlock


ResourceVar Resources = 0;
msisdn := "4711";
• Some SimulatorVariables, RES_LinkNo := 2;
e.g. RES_LinkNo EndInitBlock;

• Variables declared as InitBlock


ResourceVar are arrays of type Resources = 1;
Integer or String with a size of msisdn := "4712";
RES_LinkNo := 1;
NumberOfResources (be careful, EndInitBlock;
can be huge!)
TestBlock
• ResourceVars are automatically Resources = 0..1;
indexed by the actual resource IdleTime = 1000;
number On WakeupTimer
Start Script(msisdn);
EndTestBlock;
For internal use
31 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language
Scripts and Control Files - Distribution

• Distribution is used to execute a set of statements according to the probability of


each alternative
• All probabilities are automatically normalized to sum of 1 (100%)
• Mostly used to start scripts in the control file in a specific ratio

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

For internal use


32 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – The Language  Back to Overview

Scripts and Control Files - Miscellaneous functions


Example

• Relative time in msec


t := Time();
Put(Pool("CCR", MSG_Universal)); /* |---- CCR --->| */
Send;
WaitFor Message(CCA); /* |<--- CCA ----| */
PRINT("Response time:" Time() - t);

• 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"

• Error level of a script execution within an On clause in control file


On WakeupTimer
Start FirstScript; // If no error, ErrorLevel() returns 0
If ErrorLevel() = 0 Then
Start SecondScript;
EndIf;

For internal use


33 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Accessing messages
Modification operations

• IPSL extended by a large range of protocol packages has


“knowledge” about the protocol specific message structure and the
parameter encoding
• IPSL provides a direct access to each part of a message
• Parameters consist of one or more Information Elements (IE’s)
• IE’s allow typed access (e.g. BCD strings)
• Parameters can be accessed hexadecimal
• Insert and Delete operations depend on the used pool message
template
• Modification commands automatically adjust all affected length fields

Const Message pool Receive buffer

Modify GetPar

Put
Value
Send buffer

For internal use


34 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Accessing messages
Steps to prepare a message for sending (1)

• Always use Simscript as a starting point for preparation of a message to be


sent
• Double click
the script file

• 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)

For internal use


35 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Accessing messages
Steps to prepare a message for sending (2)

• Select a parameter from the


parameter list
• Use the Show button to
check whether the parameter
is already present (if so, the
parameter is highlighted red)
• If the parameter is optional
and not present use the
Insert button (pay attention to
the parents occurrence)
• To assign a value to the
parameter use the Sub/Set
button (pay attention to the
parameters occurrence)
• Do the same for the next
parameter or close all open
dialogs (ESC)

For internal use


36 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Accessing messages
Steps to prepare a message for sending (3)

Important rules for message modification:


• Check whether the parameter is already present in the message from the pool
• If the parameter is not present, insert it first, then assign a value
• If the parameter is already present, assign a value
• Check whether the pool message contains parameter you don't need, delete them
• When assigning IEs of a parameter consider dependencies to other IEs
(Simscript shows a hint)
• When inserting constructed parameters like type Grouped in Diameter or
SEQUENCE in ASN.1 all contained mandatory parameters will be inserted
automatically
• When inserting a SEQUENCE OF in ASN.1 a first element of this sequence will
be inserted automatically, further elements have to be inserted first (append)
• When modifying a CHOICE in ASN.1 first delete the present choice alternative,
then insert the new one (Simscript shows a hint)

Check the effect of a modification command with the


Simscript integrated debugger while editing.

For internal use


37 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Accessing messages
 Back to Overview

Example
Addressing parameters by their occurrence

MessageArg Insert c_P_MessageArg.c_P_ListOfElements;


// The first ListElement is just present
ListOfElements
(mandatory) // Mandatory parameters are just present
ParameterA := x;
ListElement
// Add a second ListElement
ParameterA Insert c_P_ListOfElements.c_P_ListElement;
(mandatory) ParameterA(2) := y;

ListElement // Optional parameters must be inserted


// before assignment
ParameterA Insert c_P_ListElement(2).c_P_ParameterB;
(mandatory) ParameterB := m;

ParameterB
// ParameterA in another structure
(optional)
Insert c_P_MessageArg.c_P_ParameterA;
ParameterA ParameterA(3) := z;
(optional)

For internal use


38 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Main Window

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

For internal use


39 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Resource state and link state viewer

O Resource is activated locally (WakeupTimer, InternalMessage, Key or Expression)

I Resource is activated by message

∙ Resource is idle

∙ Resource is idle, WakeupTimer has expired but has not been delivered yet due to load control

− Resource has no TestBlock

F Failure, script has been ended

∙ Link is in service, connected (green)

∙ Link is out of service, waiting for connection or trying to connect (yellow)

∙ Link is out of service, connection failed (red)

For internal use


40 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Menu structure

For internal use


41 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Internal Message Analyzer

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

For internal use


42 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Shell Integration overview

• Interactive usage of the IPSL tools into the windows context


menu
• Script editor Simscript
• Script compiler IPSLC
• Simulator IPS
• Trace decoder MSG
• Context menu configuration application supporting
• Selection of the actual protocol version
• Selection of special command line options of various tools
• Managing profiles and recent selected protocol versions

For internal use


43 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Shell Integration overview
Selection of another protocol version, just Select the target output and special options of
begin typing, the list reduces automatically the compiler and other IPSL tools

For internal use


44 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
Shell Integration

• 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

For internal use


45 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Graphical User Interface
 Back to Overview

Shell Integration Setup

• How to setup the shell integration


– Tools are installed using the IPSLTool.exe InstallShield
package:
– In this case the install program installs the shell integration too
– The tools are installed on a network drive:
– set the environment variable TOOLPATH to the tools directory
– add this directory to the PATH variable
– open cmd.exe with administrative permissions,
change to the tools directory and run
▪ regsvr32 ipslshellext.dll
▪ regsvr32 win64\ipslshellext.dll (additionally on 64 bit systems)

For internal use


46 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Internal Architecture
Structure overview

IPS

Windows User- Central Event IPSL-Interpreter


Interface Scheduler • Interpretation of script statements
• Access to messages (Modify, GetPar)

Utilities Simulation Layer


• specific for the actual simulated protocol
Global variables Timer
• dialog handling (message distribution to Scripts)
and types management
• adds and removes envelope (protocol heder)
• ensures protocol integrity

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

Access to the Online-Statistic Transport Layer


trace file • Connection establishment
• Sending/receiving messages via network interface SUT
• Handling of connection errors

For internal use


47 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Internal Architecture
Increasing the number of simultaneous calls

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

Resources = 0; Resources for


: : No implicit extension for resources 0..63 individual tasks
Resources = 63;
Resources = 64, 128, 192, 256 ...
Resources for
: : : : :
same tasks
Resources = 127, 191, 255, 319 ... NumberOfResources-1

• Default resource • Implicit extension of the TestBlock’s


range of 0..127 resource Range
• MUST NOT be present in TestBlock
specification

For internal use


49 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS – Internal Architecture
 Back to Overview

Increasing the number of simultaneous calls - Exercise

• 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;

For internal use


50 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication
Why do we need Inter Script Communication?

• One script executes just a single communication flow


• Complex test scenarios require multiple flows at different
interfaces and maybe different protocols
• Connected flows not initiated by the SUT needs to be
synchronized by Inter Script Communication
• Example Flow:
Script 1 Script 3
Msg 1
Msg 2
SUT
Msg 4
Msg 3

Script 2
Msg 5
Inter Script
Communication to Msg 6
trigger Script 2

For internal use


51 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication
Internal Messages Basics

• IPSL concept of Internal Messages allows to synchronize


scripts
• Exchange of arbitrary payload (bytes string) between scripts
• Supports exchange of Internal Messages between different
simulator instances
• Internal Messages are protocol independent and can be used
to synchronize simulators of different protocols
• Just two message types:
• IM-InvokeData to initiate the communication (mandatory)
• IM-Data to proceed the communication (optional)

For internal use


52 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication Example

Message types Invoke Data and Data

Script or Control File:


SendInternalMessage(InvokeData, "MyPattern", "MyData")

A IM InvokeData B
Origination Pattern Data

Control File:
On InternalMessage(InvokeData, "MyPattern")

or Script:
WaitFor InternalMessage(InvokeData, "MyPattern);

Script or Control File:


SendInternalMessage(Data,
InternalMessageOrigination(), "4711")

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

Automatic cancellation of the peer script on error

SendInternalMessage(InvokeData, "MyPattern", "MyData")

A IM InvokeData B

WaitFor InternalMessage(InvokeData, "MyPattern);


orig := InternalMessageOrigination();
InternalCancelOnError(orig, On);
SendInternalMessage(Data, orig, "4711")

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

For internal use


54 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication Example

Automatic script cancellation on undeliverable IM-InvokeData

SendInternalMessage(InvokeData, "MyPattern", "MyData")

A IM InvokeData B

No matching On- or WaitFor


statment for this pattern.
Message will be forwarded
to the next connected

undelivered IM-InvokeData

Automatic script cancellation due


to discarded IM-InvokeData

Config File:
[Simulation]
CancelOnDiscardedInternalMessages=1

For internal use


55 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication Example

Communication via External Channel

PC1: IP = x Configuration Syntax:


IPS 2 [SIMULATION]
InvokeData: ExternalChannel=TCP,b,y,c ExternalChannel=TCP, L_PORT, R_IP, R_PORT
"MyPattern"

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“);

For internal use


56 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Inter Script Communication
 Back to Overview

Watch for these four green symbols in the


Configuration and trouble shooting lower right corner of the IPS window:
R: Receive channel
S: Send channel
Configuration in section [Simulation]: ID: Has unique device ID
L: Loop has been tested
• Configuring the remote IP address and Port numbers
ExternalChannel=TCP, L_PORT, R_IP, R_PORT

• Specify a timeout in msec, otherwise the IPS terminates


ExternalChannelTimeout= ;default 0

• Enables waiting for external channel to start simulation


WaitForExternalChannel=1 ; default is 0

• Specify a timeout until the external channel must be established


CancelOnDiscardedInternalMessages=1 ; default is 1

• Enable shutdown of all connected IPS instances


SendInternalMessageShutdownOnExit=1 ; default is 0

• Enable tracing of internal messages for debugging


TraceInternalMessages=1 ; default is 0

For internal use


57 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS Load Generation
Basics

Load means the number of generated calls per time interval:


• Calls per hour (BHCA, busy hour call attempts)
• Calls per second (CPS)

IPS load control characteristics:


• Load control works per IPS instance, not per Resource or TestBlock
• Controls the delivery frequency of WakeupTimer
• Scripts triggered by events other than WakeupTimer (e.g. by message)
are not affected
• Implies simultaneous execution of scripts
• Constant load generation independent from call duration
• Realized by delaying WakeupTimer dynamically

For internal use


58 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS Load Generation Example

WakeupTimer

• WakeupTimer is an automatic timer event in the Control File


• One WakeupTimer per Resource
• Used to initiate any actions in Control File, e.g. start of scripts
• No need to start or stop WakeupTimer explicitly
• Different methods to specify timer interval:
WakeupTimer

Script Script Script

IdleTime IdleTime IdleTime

Script Script Script

CycleTime CycleTime CycleTime


For internal use
59 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS Load Generation
Load Control

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]

For internal use


60 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS Load Generation
How to set the Load Control

Initial values: At IPS run time:


> Configuration file: > Menu > Dialogs > Load Control

[Simulation]
LoadCtrlQuantity=1 ; one call
LoadCtrlStep=1000 ; per second

or

LoadCtrlBHCA=3600 ; calls per hour

or

LoadCtrlCPS=1 ; calls per second

At IPS run time by test case:


> Macros

SET_LOAD_CTRL(step,quantity)
SET_LOAD_CTRL_BHCA(bhca)
SET_LOAD_CTRL_CPS(cps)

For internal use


61 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPS Load Generation
 Back to Overview

Example: Automatic load ramp up

• Automatic load increasing up to 100 kBHCA within ten steps


IpslVersion
IpslVersion 2.0;
2.0;
SimulatorControlFile;
SimulatorControlFile;
Var
Var
bhca
bhca :: Integer;
Integer;
TestBlock
TestBlock
Resources
Resources == 0;0;
CycleTime = 10000;
CycleTime = 10000;
Loop
Loop == 10;
10;
ExcludeWakeupTimerFromLoadControl;
ExcludeWakeupTimerFromLoadControl;
On
On WakeupTimer
WakeupTimer
bhca
bhca :=:= bhca
bhca ++ 10000;
10000;
PRINT("Load
PRINT("Load Control == "" && bhca
Control bhca && "" BHCA");
BHCA");
SET_LOAD_CTRL_BHCA(bhca);
SET_LOAD_CTRL_BHCA(bhca);
EndTestBlock;
EndTestBlock;
TestBlock
TestBlock
Resources
Resources == 1..127;
1..127;
CycleTime
CycleTime == 1;
1;
On WakeupTimer
On WakeupTimer
Start
Start Client
Client With
With Options
Options NoTickets;
NoTickets;
EndTestBlock;
EndTestBlock;

For internal use


62 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Simulator Extensions
Tone Interface Unit (IPSLTiu)

• 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

For internal use


63 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Simulator Extensions Example

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

For internal use


64 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Simulator Extensions
 Back to Overview

Example
Mobile Phone (Handy)

• For interactive testing or


Product demonstration
• Uses predefined internal
messages via TCP/IP to
invoke specific actions on a
signaling interface
• Dialed digits are sent to the
simulator
• Any text messages can be
displayed
• Supports picture phone book
• Support of WAV-files
playback

For internal use


65 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Purpose

• IPS contains an online-statistic that collects information on


the running test cases. Some data is collectet automatically,
some data may be passed from the test case.
• The online-statistic is designed to allow evaluation of long
duration and load tests without interfering with the load
generation.
• The online-statistic aggregates the passed data
• The results of the online-statistic are visible in the GUI,
printed to the trace file or written to a seperate statistic file

For internal use


66 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Collected Data

There are four types of data that is stored in the online-statistic


• Global counter: E.g. number of calls, errors, transmitted messages
• Free counter: By IPS or by Script
• Measurements: E.g. response times, queue length
• Call tickets: Information on a running call

The evaluation of the data depends on its type


• Current load for number of calls and transactions
(global counter)
• Min, max, average, quantil (measurements)
• Just output to statistic file for post test evaluation
(counter, call tickets)

For internal use


67 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Overview

Online-Statistic
Built in data Counter
collection

Global data Measurements


Data provided by
scripts
Call tickets

-------------- BEGIN of statistic 1 (A)


Statistic on A-side; Seiz/Fail
---------------------------------------- Statistic tables Show current Raw statistic
A001=4712 1000
B001=4711 194 in trace file data in GUI data file for
----------------------------------------
NUMBER OF CALLS : 1000 post
NUMBER OF FAILED CALLS : 194
FAILURE RATE : 19.400% processing
NUMBER OF PENDING CALLS : 0
MAX SIMULTANEOUS CALLS : 64
IPSL INTERPRETER (error) 6 : 108

For internal use


68 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Automatically collected data

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

For internal use


69 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Script interface

The online statistic is accessed by the script via the command


Statistic():
Statistic(<type>, <arg1>, <arg2>)
• Type determines the statistic function to be used
• Types are defined in %toolpath%\ipsl\_macros\sslstat.h
• Depending on type there may be zero to two arguments

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.

For internal use


70 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Call Tickets

Script command to control the call ticket of the call:


Statistic(CT_Open)
Statistic(CT_Close)
Statistic(CT_Cancel)
Statistic(CT_UserData, "<tag>", "<data>")

The IPS automatically adds script name and creation time to


the call ticket. In case the scripts runs into an error, useful
error information is added to the call ticket as well.
When a call ticket is closed, it is printed to the statistic file:
2013-11-01_21:35:34|T|ST=2013-11-01_21:35:33|OP=O|SN=moc.scr|…

When a call ticket is canceled all collected data is discarded


and nothing is printed to the statistic file. When a call ticket is
open at the end of the script, it is closed and printed.
For internal use
71 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Counter, Measurements

The type CT_Counter is used to count an event on a global


user defined counter. The counter is created when used for
the first time:
Statistic(CT_Counter, "<counter name>")

Use CT_Measurement to statistically evaluate measured


values (e.g. response times). Different kinds of values are
distiguished by name. The IPS will not memorize each
individual value but aggregate them.
Statistic(CT_MeasurementValue, "<name>", <value>)

For internal use


72 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Statistic tables in trace file

-------------- BEGIN of statistic 1 (A)


Side
NUMBER OF COMPLETED CALLS : 1192
Calls NUMBER OF NOT FAILED CALLS : 1114 Number of calls,
(A/B-Side) NUMBER OF FAILED CALLS : 78
errors and error rate
FAILURE RATE : 6.543
NUMBER OF PENDING CALLS : 0
MAX SIMULTANEOUS CALLS : 883
-------------- END of statistic 1 Counter from script
-------------- BEGIN of statistic 3 (F)
MOC : 75 Automatic counter
Counter moc.scr(33):Message(RC) rece
with Error details:
ived : 29
moc.scr(33):Timer(SCP_Timeou • Script name
t) expired : 16 • Script line number
-------------- END of statistic 3
-------------- BEGIN of statistic 4 (M)
• Event type
Measurement:
• Event name
Measure- count min max aver • Count
MOC call setup:
ments
868 11 1007 519 Aggregated
Q50.000=520 Q95.000=980 Q99.500=1100
measured values:
-------------- END of statistic 4 • Name
-------------- BEGIN of statistic 6 (T) • Count
Traffic Dir Bytes Msgs Bytes/s Msgs/s
• Min/Max/Average
(lower layer) Snd 315404 2009 624 4
• Quantils
Rcv 259778 998 0 0
-------------- END of statistic 6

For internal use


73 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Statistic tables in trace file

To trigger the output of


a statistic table into the
trace file, the menu “Statistic”
may be used.

There are statistic types


to trigger the output from a script:
Statistic(CT_PrintCallStatistic[, "A" | "B" | "AB"])
Statistic(CT_PrintCounterStatistic)
Statistic(CT_PrintMeasurementStatistic[, <quantil>])
Statistic(CT_PrintResourceStatistic)
Statistic(CT_PrintTrafficStatistic[, "<name>" | ""])

For internal use


74 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Permanently visible statistic values

Status line of the IPS GUI displays global counter

The values may be read by script via simulator variables:


• OutSeizure/IncSeizure
• OutError/IncError
• OutLoad/IncLoad
• OutErrorRate/IncErrorRate
• OutActive/IncActive
Status line may be switch to display transactions instead of
calls

For internal use


75 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
Statistic file

The IPS may write the collected statistic values periodically to


a statistic file. This is enabled in IPS config file:
[Statistic]
File=<filename>
StatisticInterval=<ms>

The data is intended to be used by some post-processing


tooling. A documentation of the statistic file may be found
here: %toolpath%\online.hlp\statproc\index.htm
Global values:
2013-11-01_21:35:35|S|14|12|2|74|0|0|0|0

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

Statistic data can be erased from the menu “Statistic” or from a


script:
Statistic(CT_ClearStatistic)

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.

For internal use


77 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Online-Statistic
 Back to Overview

Example

IpslVersion 2.0; • CT_Open


Open a call ticket, alternatively option
Script moc(callingPA : String; calledPA : String;
duration : Integer); CallTicket may be used with start
command in control file
Activated Locally;

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.

Statistic(CT_UserData, "CGPA", callingPA); • CT_Counter, <name>


Statistic(CT_UserData, "CDPA", calledPA); Counter for general purposes, addressed
Statistic(CT_UserData, "CT", "MOC");
by their name
Statistic(CT_Counter, "MOC");
• CT_MeasurementValue,
tStart := Time();
Put(Modify(Pool("IDP", MSG_Component))
<name>, <value>
… Pass a measured value to have some
EndModify);
Send;
statistical evaluations on it
WaitFor Message(CON);
• CT_Cancel
Statistic(CT_MeasurementValue, "MOC call setup", For load tests it may be useful to have call
Time() - _time);
tickets only for failed calls. So cancel the
Statistic(CT_Cancel); call ticket when EndScript is reached and
EndScript; the call has succeeded.

For internal use


78 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Remote Testing
Control of one or more remote IPS
applications:
• using the traffic saving IPS remote
control interface
• using standard software (e.g. VNC)

Implementation Under Test Intranet

connected locally to IPS


For internal use
79 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Remote Testing Example

Remote control Interface

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

For internal use


80 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Remote Testing
 Back to Overview

IPS Remote control simulation

• Complete mapping of remote control


commands to Remo Messages IPS -
Remo
• Control sequences are written in IPSL
• Control of one or more
IPS applications IPS Control Interface

IPS - IPS - IPS -


Sim 1 Sim 2 Sim n

Protocol 1
Protocol n

• All IPSL features for SUT


test automatization
are available

For internal use


81 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases

• During test case development


– Prevent errors by using simscript
– Most common problem is how to modify a message
– Checking message modifications
– Test IPS against IPS

• During test against SUT


– Understanding the GUI of the IPS
– Reading trace files
– (Problems with .h files)
– Monitoring
– „PRINT“ debugger

For internal use


82 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
Modification of messages

F8 – step through modify


F9 – run until end of modify
F4 – run to cursor
For internal use
83 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
Modification of messages

• Let’s try this! Invoke


1 Invoke ID
4 00001011 Invoke ID value : 11 (0x0B)

• Try to create this 2 Local Operation


7 00101100 Operation Code : CallInformationReport INV *

message from the 3 CallInformationReportArg


3.1 RequestedInformationList
3.1.1 RequestedInformation

“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

• Walk step by step 22 1------- Extension Indication 2


-1010100 Cause Value
: last octet
: call identity in use

through your modify


3.1.2 RequestedInformation
3.1.2.1 RequestedInformationType
27 00000000 RequestedInformationType : CallAttemptElapsedTime

commands and watch 3.1.2.2 RequestedInformationValue


3.1.2.2.1 CallAttemptElapsedTimeValue
32 00001101 CallAttemptElapsedTimeValue: 13 (0x0D)

how the message 3.1.3 RequestedInformation


3.1.3.1 RequestedInformationType

changes 37 00000001 RequestedInformationType : CallStopTime

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)

For internal use


84 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
Selftest

• IPS can usually simulate both sides of a communication


• Write a (simple) counterpart for your test case
• Run IPS against IPS with monitoring on the check the
messages
• Connect the two IPS
– Via TCP/UDP and localhost
– Use a control file with script for both sides and use LOOP lower
layer

For internal use


85 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
Reading trace files
• IPS version
MAIN : Independent Protocol Simulator (IPS) 14 14:44:21.57
: IPS32, Build: 13.02.2006 (dh)
: File time: 2006.02.13_15:14:40

• Loaded config files


MAIN : Reading IPS-Config: 14 14:44:21.57
: "D:\test\moditest\ips.cfg": OK
: "x:\tools.pre\ips.cfg": OK

• 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

• Used scripts and control files


MAIN -0 -0 : +------------------------------------------+ 14 14:44:21.61
MAIN -0 -0 : | IPSL-Interpreter V 2.0 01.03.1999 | 14 14:44:21.61
MAIN -0 -0 : +------------------------------------------+ 14 14:44:21.61
MAIN -0 -0 : | Simulator: | 14 14:44:21.61
MAIN -0 -0 : | ips32.exe 06.02.13_15:14:40 | 14 14:44:21.61
MAIN -0 -0 : | Control file: | 14 14:44:21.61
MAIN -0 -0 : | tst(map03hlr) | 14 14:44:21.61
MAIN -0 -0 : | 06.03.14_14:44:10 06.03.14_14:44:12 | 14 14:44:21.61
MAIN -0 -0 : | Scripts: | 14 14:44:21.61
MAIN -0 -0 : | TST(map03hlr) | 14 14:44:21.61
MAIN -0 -0 : | 06.03.14_14:43:16 06.03.14_14:44:12 | 14 14:44:21.61
MAIN -0 -0 : +------------------------------------------+ 14 14:44:21.61

For internal use


86 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
Reading trace files

• Resource 1 is A-Side and sends a message to network


R000001-0 -1 : usr: |--BEGIN---------->| | 14 14:44:21.67

• Resource 97 is B-Side and receives a message from network


R000097-3 -1 : net: | |--BEGIN---------->| 27 10:12:06.07

• Monitoring on a lower layer (UDP)


UDP -0 -0 : Send data: sock=212 len=296 28 14:35:09.44
: L=0.0.0.0(?):1664
: R=127.0.0.1(?):5080
: 0 - 49 4E 56 49 54 45 20 73 69 70 - INVITE sip
: 10 - 3A 62 65 72 6E 68 61 72 64 40 - :bernhard@

• Call Ticket, call on resource 0 ended


R000000-0 -0 : $æ&cîëàÄöÒ<.F7 28 14:38:23.83

Print from Script running on resource 7


R000007-0 -7 : CSeq=1 22 08:59:25.39

• Error on resource 1: Script=Client, Line=25, Error=Cancel(1)


R000001-0 -1 : ***ERR=7 (Client(25):Can(1)) 28 14:35:10.45

• Error message from the SimulationLayer


SIP : No resource for this message: 200 OK, mt=200 28 14:38:24.84
: , link=0

For internal use


87 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Debugging test cases
 Back to Overview

Reading trace files

Script error messages (most important):


External cancel - The link the script used went down (not counted as error)
Illegal instr. - Maybe a version problem
Invalid arg - The value “Invalid” was passed to a command
Put failed - Problem in Put, the reason should be found before this in trace
Send failed - Same for Send

Modi:Ill Cmd - Maybe a version problem


Modi:Ill.MV-Ptr - Problem with Mandatory-Variable-Pointer in ISUP message
Modi:OptPar mis - The optional parameter to be modified is not present
Modi:OptPar dup - The optional parameter to be inserted is already present
Modi:OptPar ill - The optional parameter is not allowed for this message
Modi:Par mis - The parameter to be modified is not present
Modi:IE mis - The IE to be modified or read is not present
Modi:Ill BCDStr - Wrong value for this IE
Modi:Ill BitStr
Modi:Ill OID
Modi:Ill USSD
Modi:Ill UTF-8
Modi:Ill UCS-2
Modi:Ill IPAddr
Modi:Ill fix ln - IE has fix length and the new value has wrong length

For internal use


88 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation

• The IPS supports a lot of INAP an MAP versions:


– INAP 3 to 9 in numerous country specific versions
– MAP v1, v2, v3 .. Release 7
• The IPS is the same for all, the specifics are in the user part
packages (protocol versions). This means the IPS provides
the TCAP layer, the INAP/MAP layer is in the scripts.
• The scripts care about:
– Prepare dialog portion (only for TC-BEGIN)
– Prepare components
– Sending the messages
– Wait for components
– Evaluate and check parameters

For internal use


89 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation

Script example for MAP (RoutingInfoForLCS)


IpslVersion 2.0;

Script hlrForLP(MSISDN : String) ;

Activated By Message(SRIL); /* |<--- SRIL ----| */

BeginScript

/* modify the predefined message with own parameter */


Put(Modify(Pool("R_SRIL", MSG_Component)) /* |---- R_SRIL --->| */
/* imsi */
ADDR_Imsi := MSISDN;

/* MSC Number */
EXT_Msc_2Dh_Number := 1;
NADI_Msc_2Dh_Number := 1;
NPL_Msc_2Dh_Number := 1;
ADDR_Msc_2Dh_Number := "49179423";
EndModify);

/* send the message */


Send;

EndScript;

For internal use


90 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation

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

For internal use


91 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation

There are ways to overcome the automatics, e.g. for robustness tests:

• Choose a different TCAP message type:


– TC_MessageType :=
TC_BEGIN | TC_CONT | TC_END | TC_ABORT

• To use specific transaction ID's or invoke ID's,


there are simulator variables to set the values:
– InvokeID, OTID, DTID

• Special DialogPortion handling:


– Send a special ACN: Put a DialogPortion of your choice
– Send no DialogResponse, though a DialogRequest was received:
Put(MSG_DialogPortion_CHAR);

For internal use


92 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation
Simulation via OMNI-Gateway (ogw)

System under Test


ogw Application
Port=p to be tested

SSN=x SSN=y
TCP/IP
Tester
OMNI

SPC=spc, IPAddr=ip

ogw arguments: ogw –o x –s y –p p


IPS config file:
[SIMULATION]
Layers=MAP,TCP

[TCP]
Link0=R_IP=ip,R_PORT=p

For internal use


93 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation
Simulation via TX4000 card

System under Test


TX4000 card:
Application
PC with to be tested Product of NMS
TX4000 card Communications

www.nmss.com
Tester
OMNI

E1 connection SPC=spc Features:

4 E1 interfaces
IPS config file:
32 Links
[SIMULATION]
Layers=MAP,TX3000 MTP 1-3 on board
[TX3000]
Link0=spc

For internal use


94 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation
Simulation via TX card gateway (tgw)

tgw PC System under Test

tgw Application Application


to be tested
Port=p
TCP/IP

Tester TX4000 card

IPAddr=ip OMNI

IPS config file: E1 connection

[SIMULATION]
Layers=MAP,TCP

[TCP]
Link0=R_IP=ip,R_PORT=p

For internal use


95 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation
Comparison of the three variants

ogw TX4000 tgw


multi user
yes no yes When use what
capable
ogw and tgw for
high load capable yes yes no functional tests
black box test (no ogw and TX4000
impact on the
no yes yes for load tests
system under
test)

The used method has no impact on the test cases


themselves, only the IPS cfg has to be changed to
switch from one method to another

For internal use


96 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
INAP/MAP Simulation
 Back to Overview

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)

For internal use


97 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation

• IPS can simulate HTTP/1.0 and HTTP/1.1


• It can simulate HTTP client and server
• Requests and Responses are sent or received by the script
• For easy modifying and reading of parameters the message
are delivered in an ASN.1 form
• The message consists of three main parts:
– The request / status line
– The HTTP headers
– The body
• The body may be plain binary data, a HTML page extract, a
filled in form or a file name

For internal use


98 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation
IPS Layer overview

HTTP Simulation Layer

Optional, supports HTTP


SEC Security Layer
over TLS (HTTPS)

TCP Layer

Simulation Layer Possible layer configuration in section [Simulation]


Intermediate Layer Layers=HTTP,TCP
Layers=HTTP,SEC,TCP ; HTTPS
Transport Layer

For internal use


99 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation

• Sample of a ASN.1 HTTP request message:


Request
1 RequestLine
1.1 Method
6 ******** Method : POST

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

For internal use


100 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation Example

• Sample of a ASN.1 HTTP response message:


Response
1 StatusLine
1.1 HTTPVersion
6 ******** HTTPVersion : HTTP/1.1

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

• In HTTP normally resources and links are related 1:1


• The SimulationLayer opens the TCP connection if a request Sent and received
message are written
is to be sent and closes it after the response has been to the trace file
depending on the
received value “Monitor” in the
cfg file:
• NEW: A connection may be reused. The HTTP header
“keep-alive” is obeyed • 0 = no monitoring

• SOON: A connection may be used by many resources to •



1 = only arrow
2 = HTTP message
have parallel requests on one link • 3 = ASN.1 message
• The SimulationLayer converts the ASN.1 messages from • 4 = HTTP and
ASN.1 message
the script to HTTP and stores them in the send buffer
• Received messages are converted to ASN.1 and sent to the
script
• The received messages may be examined via the ASN.1
message the script receives
• For the body, there are some help functions to access it in
the send or receive buffer

For internal use


102 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation

• Functions to replace values in the send buffer:


HTTP defines to patch messages - sending (only to use between: Put and Send )
-----------------------------------------------------------------------------
MODIFY_MSG_PART(str_beg,str_val,str_end)
str_beg [input]: fix string to search (begin)
str_val [input]: fix new string between 'str_beg' and 'str_end'
str_end [input]: fix string to search (end)

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

For internal use


103 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
HTTP Simulation

• Functions to read values from the receive buffer:


HTTP defines to check messages (only to use after: WaitFor Message(Response); )
-------------------------------------------------------------------------------
CHECK_MSG(x,y,z,ml) - old macro (please use: CHECK_MSG_PART)

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)

For internal use


104 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
XML over HTTP Simulation

• 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

For internal use


105 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
XML over HTTP Simulation
 Back to Overview

Example

• Example of a XML over HTTP test case


IpslVersion 2.0; <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ELIR SYSTEM "MLP_ELIR.DTD">
Script httpSSR (msIsdn : String; xmlFile: String; varMachine : String); <ELIR ver="1.0">
<CLIENT>
Activated Locally; <ID>Otto</ID>
<PWD>topSecret</PWD>
Var </CLIENT>
res : String; <MSIDS>
<MSID>$MSID$</MSID>
BeginScript </MSIDS>
Put(Modify(Pool("Request2", MSG_UNI_POOL)) /* |---- Request --->| */ <LOC_TYPE loc_type_type="CURRENT_OR_LAST"/>
Method := "POST"; </ELIR>
RequestURI := "http://" & varMachine ;
HTTPVersion := "HTTP/1.1";
Host := varMachine;
Insert c_P_Request.c_P_GeneralHeader;
Insert c_P_GeneralHeader.c_P_Connection;
Connection := "keep-alive"; [SIMULATION]
Insert c_P_RequestHeader.c_P_AcceptCharset; CTL_File=...
AcceptCharset := "iso-8859-1,*,utf-8"; Title=LP - API1 Client
Delete c_P_RequestForm; Layers=HTTP,TCP
Insert c_P_Request.c_P_RequestFilename;
RequestFilename := xmlFile; [TCP]
EndModify); Link0= R_IP=158.226.200.63, R_PORT=9210
REPLACE_MSG_PART2(“$MSID$”, msIsdn);
Send; [HTTP]
Monitor=4
StartTimer(Timer_Response, 20*SEC); FPath=..\xml
WaitFor Message(Response,GetPar(ReasonPhrase)="OK"); /* |<--- Response ----| */
StopTimer(Timer_Response);

res := GET_MSG_PART1("<result>", "</result>", 1);


If res <> “OK” Then
Cancel(1, NoReset);
EndIf;
EndScript;

For internal use


106 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SOAP Simulation

• The SOAP simulation is an extension of the HTTP


simulation
• It inherits nearly all features of HTTP
• But the interface to the script is completely different, now
SOAP messages are sent and received
• HTTP + TCP is the transport
• For easy modifying and reading of parameters the message
are delivered again in an ASN.1 form
• There are some fields in each message to control the HTTP
envelope

For internal use


107 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SOAP Simulation

• The SOAP simulation is generic


• For each interface a protocol version is need
• Protocol version is provided by IPSL development and built
from WSDL description of the interface
• Naming convention for SOAP protocol versions is
wsxxxxnn, eg. wstis01 (ws = web service)
• SOAP simulation layer codes and decodes SOAP evelopes
in HTTP body
• Special “NotASoapMessage” message for HTTP messages
without SOAP envelope (e.g. 302 Redirect)

For internal use


108 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SOAP Simulation

• General form of message


HHttpRequestInformation ::= SEQUENCE {
method [0] IA5String OPTIONAL,
uRI [1] IA5String

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> }

<wsdl:portType name="TisInterface"> ExecuteCommand ::= [5] SEQUENCE {


<wsdl:operation name="ExecuteCommand"> httpReqInfo [0] HttpRequestInformation,
<wsdl:documentation>TBD</wsdl:documentation> additionalHttpHeader [1] AdditionalHttpHeader OPTIONAL,
<wsdl:input message="tns:ExecuteCommandRequest" /> soapHeader [2] SoapHeader OPTIONAL,
<wsdl:output message="tns:ExecuteCommandResponse" /> executeCommandParameters [3] SEQUENCE {
<wsdl:fault name="fault" message="tns:TisException" /> commandRequestData [0] Anonymous15
</wsdl:operation> }
</wsdl:portType> }
ExecuteCommandResponse ::= [6] SEQUENCE {
httpRspInfo [0] HttpResponseInformation OPTIONAL,
additionalHttpHeader [1] AdditionalHttpHeader OPTIONAL,
soapHeader [2] SoapHeader OPTIONAL,
executeCommandResponseParameters [3] SEQUENCE {
commandResponseData [0] Anonymous16
}
}

For internal use


109 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SOAP Simulation

• Example of a SOAP message to/from the script


ExecuteCommand
1 HttpReqInfo 2.1.2.1.2.2 ByteParameter
1.1 URI 2.1.2.1.2.2.1 ByteParameter_Name
6 ******** URI : /sample/ 60 ******** ByteParameter_Name : par2

2 ExecuteCommandParameters 2.1.2.1.2.2.2 ByteParameter_Value


2.1 CommandRequestData 66 00001100 ByteParameter_Value : 12 (0x0C)
2.1.1 Environment
2.1.1.1 EnvironmentParameter 2.1.2.1.2.3 ShortParameter
2.1.1.1.1 NameValuePair_Name 2.1.2.1.2.3.1 ShortParameter_Name
24 ******** NameValuePair_Name : env1 71 ******** ShortParameter_Name : par3

2.1.1.1.2 NameValuePair_Value 2.1.2.1.2.3.2 ShortParameter_Value


30 ******** NameValuePair_Value : test 77 01111011 ShortParameter_Value : 123 (0x7B)

2.1.2 Command 2.1.2.1.2.4 DurationParameter


2.1.2.1 Operation 2.1.2.1.2.4.1 DurationParameter_Namespace
2.1.2.1.1 Operation_Name 82 ******** DurationParameter_Namespace: KVF
40 ******** Operation_Name : op1
2.1.2.1.2.4.2 DurationParameter_Name
2.1.2.1.2 ParameterList 87 ******** DurationParameter_Name : dur1
2.1.2.1.2.1 BooleanParameter
2.1.2.1.2.1.1 BooleanParameter_Name 2.1.2.1.2.4.3 DurationParameter_Value
49 ******** BooleanParameter_Name : par1 93 ******** DurationParameter_Value : 10000

2.1.2.1.2.1.2 BooleanParameter_Value
55 00000001 BooleanParameter_Value : TRUE

For internal use


110 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SOAP Simulation
 Back to Overview

• Example of a SOAP test case


[SIMULATION]
IpslVersion 2.0;
CTL_File=...
Title=LP - API1 Client
Script business;
Layers=SOAP,TCP
Activated Locally;
[HTTP]
Monitor=4
Var
login : String;
[TCP]
Link0 = R_IP=158.226.200.63, R_Port=9210
BeginScript
Put(Modify(Pool("ExecuteLogin", MSG_UNI_POOL)) /* |---- ExecuteLogin --->| */
URI := "/TisService";
Insert c_P_LoginRequestData.c_P_UserDomain;
UserDomain := “domain";
UserName := “user";
Password := “pwd";
EndModify);
Send;
WaitFor Message(NotASoapMessage); /* |<--- NotASoapMessage ----| */
uri := GetPar(Location);

Put(Modify(Pool("ExecuteLogin", MSG_UNI_POOL)) /* |---- ExecuteLogin --->| */


URI := uri;
...
EndModify);
Send;
WaitFor Message(ExecuteLoginResponse); /* |<--- ExecuteLoginResponse ----| */

Put(Modify(Pool("ExecuteCommand", MSG_UNI_POOL)) /* |---- ExecuteCommand --->| */


URI := uri;
...
EndModify);

Send;
WaitFor Message(ExecuteCommandResponse); /* |<--- ExecuteCommandResponse ----|
*/

EndScript;

For internal use


111 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
• The SIP basic RFC and a lot of extensions are supported:
– RFC 2976 - INFO method
– RFC 3262 - rel100 (PRACK method)
– RFC 3265 - Specific Event Notification
– RFC 3455 - 3GPP private header
– DRAFT - Diversion header
– RFC 3325 - Asserted-Identity headers
– RFC 3323 - Privacy Mechanism
– RFC 3515 - REFER Method
– DRAFT - Referred-By Mechanism
– RFC 3311 - UPDATE Method
– RFC 3891 - Replaces Header
– RFC 3428 - MESSAGE Method
– DRAFT - PUBLISH Method
– DRAFT - Session Timer
– RFC 3841 - Caller Preferences

For internal use


112 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
IPS Layer overview

SIP Simulation Layer

RETR Retransmission Layer

SIGCOMP Signaling Compression Layer

SEC Layer RSS Layer

UDP/TCP TCP to Linux


TCP Layer or UDP Layer or Layer RSS

Simulation Layer Possible layer configuration in section [Simulation]


Intermediate Layer (opt) Layers=SIP,RETR,UDP ; default case
Layers=SIP,RETR,RSS,TCP ; usage of RSS
Transport Layer

For internal use


113 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation

• The SIP SimulationLayer handles most header values that


are required by the protocol, e.g.:

– 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

For internal use


114 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation

– To/From + their tags


Provided by SimulationLayer, tag added if needed

– 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

• All functionality is described in the online help


For internal use
115 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation Example

• 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

For internal use


116 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
Support for SIP User

• One SIP User (e.g. a SIP telephone) needs several


independent transactions or dialogs, e.g. REGISTER,
SUBSCRIBE, INVITE
• Moreover it is e.g. necessary to reREGISTER even during a
running INVITE
• To achieve this in IPSL these action run on different
resources
• The IPS keeps the context for each:
CallId, CSeq, Route, ...
• On the other hand these actions need to be syncronized, e.g.
first REGISTER then INVITE
• Data needs to be shared, e.g. a state value or the
authorization data. This is normally not possible in IPSL
because every resource “works on its own”

For internal use


117 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
Support for SIP User

• As a solution for this IPS support a feature that defines some


resources to form a SIP user
• These resources then share at the moment:
– a UserName (string)
– a UserState (integer)
– the authorization data
• Feature is switch on in config file
– ResourcesPerUser = 2 | 4 | 8
• Then 2, 4 or 8 resources share the data mentioned above
and by this form a SIP user
• There is index for the UserName to quickly find the resource
for an incoming INVITE by the user name in the To header

For internal use


118 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
Support for SIP User

• What resources are the resources of a SIP user?


– Imagine one line in the resource state viewer
– Divide it into “ResourcesPerUser” blocks
– The resources with the same index in those blocks form a SIP user
• Formal
– RpU (ResourcesPerUser) may have values 1, 2, 4, 8
– Then the resources that represent the same
SIP user U are:
R(U, n) = 64 * (U div UpL) + (n * UpL) + (U mod UpL)
with
UpL = UserPerLine = 64 div RPU : 64 | 32 | 16 | 8
U = SIP user number : 0..
n = n-th resource of SIP user U : 0..RpU-1
• Practical
– The IPS provides SimVar SIP_UserNumber

For internal use


119 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
Support for SIP User

• Graphical version of resource – SIP user relation


– keep in mind the resource state viewer and the assignment of test
blocks to resources above 127
– Example for ResourcesPerUser = 4 (UserPerLine = 16)

– normally resources from 64 on are used for simulation


– all n-th resources of all SIP user may use the same TestBlock, this
makes the control file simple

For internal use


120 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
SIP Simulation
 Back to Overview

Counter in Retransmission Layer

• Automatic generated statistic counter


ReTr: CliTrns key exists, dis.
ReTr: Response repeated
ReTr: Rcvd Req discarded
ReTr: SrvTrns key exists, discarded
ReTr: Req retransmitted %d/%d
ReTr: Limit reached
ReTr: Purge CliTransaction
ReTr(user): discard response
ReTr(user): request

• RETR_WasRetransmit
– May be cleared from script ( := 0)
– After response is received contains the number of retransmission of
the request

For internal use


121 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Diameter Simulation
Introduction

• General Framework for AAA applications


• Widely used in IMS architecture
• Peer-To-Peer architecture
• Synchronous message exchange (request/answer)
• Successor of RADIUS protocol with many improvements:
– Transport Layer is TCP or SCTP instead of UDP to improve reliability,
retransmission is done by the transport layer
– Capability negotiation
– Server initiated messages (re-authentication, session termination)
– Higher maximum attribute data size (Diameter 16 MB, Radius 255
Bytes)
– Constructed AVPs (type is Grouped)

For internal use


122 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Diameter Simulation
Packet format
4 bytes

*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)

Data (4 Byte aligned)

For internal use


123 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Diameter Simulation
Diameter SimulationLayer

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

For internal use


124 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Diameter Simulation Example

IPS Layer overview

DIA Simulation Layer

SEC Security Layer


Optional, supports
Diameter over TLS
DIACX Capability Exchange Layer

TCP Layer or SCTP Layer

Simulation Layer Possible layer configuration in section [Simulation]


Intermediate Layer Layers=DIA,TCP ; just DIA
Layers=DIA,SEC,DIACX,TCP ; with TLS
Transport Layer

For internal use


125 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Diameter Simulation
 Back to Overview

Example
DIACX IntermediateLayer

• Automatic CER/CEA negotiation reducing complexity in scripts and


control files
• Support of Diameter specific TLS start procedure:
Client Server

TCP connection establishment TCP-Layer

CapabilityExchangeRequest (InbandSecurity=1)

CapabilityExchangeAnswer DIACX-Layer

TLS handshake SEC-Layer

Diameter (encrypted) DIA-Layer

For internal use


126 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
Introduction

• Directory service access version 3 (RFC 4511)


• Request/Response based protocol
• MessageID used for Request/Response correlation
• Specified in ASN.1
• Operations:
– BindRequest / BindResponse / UnbindRequest
– SearchRequest / SearchResultEntry /SearchResultDone
– ModifiyRequest / ModifyResponse
– AddRequest / AddResponse
– DelRequest / Response
– ModifyDNRequest / ModifiyDNResponse
– CompareRequest / CompareResponse
– ExtendedRequest / ExtendedResponse
For internal use
127 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
Basic message flow

Client Server

BindRequest (MsgID n)

BindResponse (MsgID n)

SearchRequest (MsgID n+1) • May be repeated


• Other operations
SearchResultEntry (MsgID n+1) possible like:
• Modify
SearchResultDone (MsgID n+1) • Add
• Del ...

UnbindRequest (MsgID n+2)

For internal use


128 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
Layer Overview

LDAP Simulation Layer

SEC Security Layer


Optional, supports
LDAP over TLS
LDAPS Layer

TCP Layer

Simulation Layer Possible layer configuration in section [Simulation]


Intermediate Layer Layers=LDAP,TCP ; just LDAP
Layers=LDAP,SEC,LDAPS,TCP ; with TLS
Transport Layer

For internal use


129 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation Example

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

For internal use


130 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
LDAPS IntermediateLayer

• Support of LDAP specific TLS start procedure:

Client Server

TCP connection establishment TCP-Layer

ExtendedRequest-StartTLS

ExtendedResponse-StartTLS LDAPS-Layer

TLS handshake SEC-Layer

LDAP (encrypted) LDAP-Layer

For internal use


131 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
Important configuration items

• 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

For internal use


132 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
Important Simulator Variables

• 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;

For internal use


133 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
LDAP Simulation
 Back to Overview

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

LDAP_Filter := "(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))";


Put(Modify(Pool("SearchRequest", MSG_UNI_POOL))
// ...
EndModify);
Send;

WaitFor Message(SearchRequest);
PRINT(LDAP_Filter);
// -> "(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))"

For internal use


134 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
• IPSL is designed to have the same test case scripts for
functional, load and regression tests
• Test cases may be combined in control files
• All tools may run from command line without user interaction:
– ipslc –p <profile> -c its <scripts and control files>
– ips <config file>
– msg (see msg /? for options)
msg /its /tcap /nw /up=map03hlr <trace> > <output>
msg /its /tcap /nw /up=http <trace> > <output>
• Hint: the command line is always echoed when a tool is run
from the context menu
• There is a special tool to run a number of test cases in batch
and check the success of each test case. It is called Test Suite
Manager (TSM)

For internal use


135 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
Organization of test cases
• Test suites often contain data which is equal for all test
cases. IPSL supports include mechanisms to maintain Example of a
common data at a central location: test suite
– in control files, scripts uses the C preprocessor: structure
#include <filename>
– to use scripts from a directory different from the directory of the
control file:
#pragma SCRIPTLIB=<path>
– to include data from another file in a IPS cfg file:
[include]
include
<filename>
• All paths and filenames are relative to the actual file Note: changes in
• BUT PLEASE CONSIDER the common files
– this violates the idea, that test cases are executable as single affect many test
units cases and may
– if files from other directories are included it is more complicated make them not
to reuse the case or give it to other users work any longer.

For internal use


136 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
Organization of test cases
c:\test
Scripts and control files scr_lib (*.scr)
• are usually located in the same directory
config (*.cfg)
• scripts can be located in another directory
(library) when using the SCRIPTLIB pragma test1 (.ctl, .cfg)
in the control file, e.g.
#pragma SCRIPTLIB=c:\test\scr_lib test2 (.ctl, .cfg)

test3 (.ctl, .cfg)

Split configuration files Accessing configuration defines


• Complex configuration may be split into • config file may contain a defines section, e.g.
several files [DEFINES]
• configuration files may be passed as host=194.92.4.101
command line arguments for ips32.exe, e.g. port=5060
ips32.exe test1.cfg c:\test\config\common.cfg • accessing within config file, e.g.
• config files may be nested by using the [TCP]
include section, e.g. Link0=R_IP=%host%,R_PORT=%port%
[INCLUDE] • accessing during runtime in scripts, e.g.
%%..\config\common.cfg host := GetCfgDefine("host");
port := GetCfgDefine("port");

For internal use


137 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
Support by IPS

• 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.
...

StartTimer(Timer_Response, 20*SEC); // never catch supervision timer to cancel the script


WaitFor Message(Response,GetPar(ReasonPhrase)="OK"); // if different message or other event
// -> Error, no OK message
StopTimer(Timer_Response);

res := GET_MSG_PART1("<result>", "</result>", 1);


If res <> “OK” Then
Cancel(1, NoReset); // if result <> ok -> Error, no OK message
EndIf;

PRINT(“http01: TESTCASE OK”); // we have reached EndScript -> OK


EndScript;

For internal use


139 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
Evaluating the test

• Another way is to pass ResourceVar as a Var argument to the script. At


the beginning set it to 0, at the end of the script to 1.
Script Test(Var TCres : Integer, ...);

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;

• A new method is to use the function ErrorLevel() to check the


result of the last script.
On WakeupTimer
Start Test(...);
If ErrorLevel() = 0 Then
Print(“TEST OK”);
EndIf;

For internal use


140 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
Evaluating the test

• 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

For internal use


141 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test automation
 Back to Overview

Evaluating the test

• The latest method is a way to define the conditions for a


successful test in the cfg file. The IPS will then set the error
level accordingly.
[SIMULATION] Conditions:
ExitCode=
+ UserExitCode, ; set by SimVar IPS_UserExitCode • UserExitCode
+ OutSeizure < 1 ->1, ; less than one 1 call
+ OutErrorRate > 12000 ->10, ; more than 12.000% failed calls • Counter:<name>
+ Counter:\"Hello World\" <= 4 -> 20 ; less than 5 times CT_Counter(“Hello World”)
• OutSeizure
• IncSeizure
ITP : +------------------------------------------+ 23 17:16:54.50 • OutError
MAIN : ExitCode set to 10 due to condition: 23 17:16:54.50
: OutErrorRate > 12000 ->10 • IncError
MAIN : Shutdown complete! 23 17:16:54.50
MAIN : ITP-Mem: +7408, -7408 23 17:16:54.52 • OutErrorRate
MAIN : STAT-Mem: +90440, -90440 23 17:16:54.52
TRC : Trace closed: 2008.01.23_17:16:54 23 17:16:54.52 • IncErrorRate

For internal use


142 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test Suite Manager
• The Test Suite Manager (TSM) is java based application to
run a lot of test cases in a sequence
• It does not depend on IPSL, may also be used for different
automatization tasks
• The test suite and the results are stored in a XML file
• The test cases itself are not part of that XML file but are stored
elsewhere in the file system
• A test case in TSM consists of
– a number of execution steps: parallel or in sequence
– a number of evaluation steps: presence of files and check if files
contain or don’t contain certain strings
• The development of the TSM is still in work
– increase usability
– increase parallel execution to decrease total execution time for a test
suite
For internal use
143 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test Suite Manager

Example test
suite in TSM

First step here is


the IPS compiler
“ipslc”.

It is followed by
the IPS
execution,
decoding of the
trace files and
the evaluation of
the decoded
trace files.

For internal use


144 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Test Suite Manager
 Back to Overview

Example
Exercise

• Use SIP01 as protocol version


• Write a simple Register script (REGISTER/200OK)
• Write the two corresponding server script: one for success
(200 OK) and one for failure with unknown user (404 Not
Found)
• Write a server control file that starts one of the server scripts
depending on the URI of the REGISTER
• Create two test cases one for REGISTER with different URI
(one for success on for fail)
• Run the test cases
• Create a test suite with TSM for the two cases
• Run the suite in TSM

For internal use


145 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Performance tests
Hints

• In best case you may reuse scripts from functional test


• Don’t write script that assume to run on certain resources
• IPS may have variable number of resources, avoid
assumptions on number of resources
• If you need groups of resources with different behaviour
use parts of range 64 .. 127 because this range repeats
for resources above 127
• Avoid prints to trace because IO may block the IPS
• Don’t run IPS at the CPU limit, this leads to unusable test
results
• Use online statistic of IPS

For internal use


146 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Performance tests
 Back to Overview

Exercise

• Reuse the REGISTER test from TSM


• Write a new server that reacts
– 1% 404
– 10% 200 OK after immediately
– 30% 200 OK after 100ms
– 50% 200 OK after 1s
– 9% don’t react at all
• Use the Distribution statement for this
• Measure the response time on client side
• Use a time out of 5s at client (so 10% of the calls should fail)
• Use all resources (128) for simulation
• Run the test for 1 min at 360 kBHCA
• Evaluate the test using the online statistic and the tools it_print and it_sum

For internal use


147 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Multiple IP addresses
Windows

• Windows 2000/XP supports an “unlimited” number of IP


addresses per interface
• Best way to add the addresses is netsh command
• Practical experienced limit is 5000
• Adding the addresses takes hours
• Performance degrades with higher number of addresses

• Configuration in ips.cfg
– Link<n> = L_IP=<ip-address>, ...

• But anyhow it is practical because available on the system


without any additional hard- or software
For internal use
148 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Multiple IP addresses
RSS

• 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

For internal use


149 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Multiple IP addresses
 Back to Overview

RSS

• Practical experience: 120.000 addresses were possible


• The IPS uses the sockets of the Linux as if they were it’s own,
there is not difference for higher layer:
– The socket addresses are available in RS layer of IPS, so higher layer
(e.g. SIP) insert the correct addresses into their PDUs
– Usable with all protocols the IPS support: e.g. SIP, MGCP, HTTP
– The IPS internal SSL/TLS layer works on these sockets, too

• Configuration in IPS
– Layers={SimulationLayer}, RS, TCP
– Configuration of RS as before TCP
– Configuration of TCP: one link to RS

For internal use


150 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – Costs / Terms of usage

• IPSL may be used for free inside RedKnee

• IPSL is distributed by BSO CBC RD Business Operations


1 DE, users are not allowed to pass IPSL to others, but
they may point them to our web site.

• IPSL must not be given to users outside RedKnee

For internal use


151 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – Support

• IPSL is developed in Berlin at BSO CBC RD Business


Operations 1 DE
• Support from development is given for free but capacity is
limited
• Errors are corrected as soon as possible
• IPSL development assumes there is someone at each site
that uses IPSL that coordinates all users at this side to
support each other.
• IPSL development usually does not have real test cases.
Test cases are shared free between all users of IPSL

For internal use


152 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL – New Features / Change Requests

• IPSL development is user driven. We don’t invent new


features ourselves.
• Users who need enhancements may request changes via
mail to any member of our group.
• Dr. Wilfried Dames
• David Hanisch
• Hans-Heinrich Kähling
• Jens Kühnel
• Change request must be paid by the one who requests
the enhancement.
• Once a new feature is implemented it is freely available to
all IPSL users

For internal use


153 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
IPSL Documents
 Back to Overview

• 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

For internal use


154 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Thank you!

For internal use


155 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview
Answer Key

Slide IPSL – The Language Control Files - Validity of Test Blocks


R000000-0 -0 : TB 2 01 08:24:46.31
R000001-0 -1 : TB 3 01 08:24:47.24
R000002-0 -2 : TB 3 01 08:24:48.24
R000003-0 -3 : TB 3 01 08:24:49.24
R000000-0 -0 : TB 3 01 08:24:50.25
R000000-0 -0 : TB 1 01 08:24:55.99

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;

For internal use


156 © Copyright Redknee Inc. 2013 Presentation and Training  Back to Overview