Вы находитесь на странице: 1из 50

RNC Node Level Regression test of

Robustness Suite

NIKLAS RYGART

Masters’ Degree Project


Stockholm, Sweden June 2011

XR-EE-KT 2011:003
Royal Institute of Technology

Master Thesis Report

RNC Node Level Regression test


of Robustness Suite

Supervisors:
Author:
Johan Lundberg
Niklas Rygart
Tobias Oechtering

June 2011
Abstract
The main objective of this master thesis is to reconstruct randomized rendered
scenarios leading to failure in the 3G system.

The incitement is the ability to easily rerun the scenario triggering a failure,
take additional traces to isolate the root cause and verify corrections.

This is achieved by utilizing CPPemu (Cello Packet Platform) which emulates


a complete 3G system, consisting of the RNC (Radio Network Controller), CN
(Core Network), RBS (Radio Base Station), UE (User Equipment), where the
three latter are simulated by 3Gsim.

A great variety of errors were discovered during the thesis in the simulated en-
vironment. This affected the ability to run traffic unimpededly and thus the
quest of reconstructing the randomized rendered scenario. One of the major
problems is that 3Gsim generates incorrect mobility events when run with ran-
dom mobility. Another problem is that the time between the executing event
are very tight, which requires an unreasonable high precision of the timing in
the environment.

Approximately ten percent of the scenarios were successfully reconstructed. Al-


though the success rate of the test runs were widely spread.

In order to tackle the problems a lot of timing parameters could be tried out,
or the more realistic solution is to modify the behavior of the environment itself
to prevent unacceptable timings in the random mobility.

1
Contents
1 Introduction 5
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 System overview 7
2.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 RNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 RAN interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 WCDMA RAN basic features . . . . . . . . . . . . . . . . . . . . 9
2.5 3Gsim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6 Erlang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.7 Common test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Model 12
3.1 Test suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Traffic behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Mobility behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Mobility file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.6 Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.7 Configuration & fine tuning . . . . . . . . . . . . . . . . . . . . . 15

4 Results 17

5 Conclusions 23

6 Discussion 24

2
List of Abbreviations
3G 3rd generation mobile telecommunications
3GPP 3rd Generation Partnership Project

3Gsim 3G simulator

ATM Asynchronous Transfer Mode

BD Broadcast Domain

CCS Common Channel


CLI Command Line Interface

CN Core Network

CPPemu Cello Packet Platform emulator

CT Common Test

DCS Dedicated Channel


EUL/HS Enhanced UpLink/High Speed

FACH Forward Link Access Channel

GPB General purpose Processor Board

GSM Global System for Mobile Communications

HHO Hard HandOver

HSPA High Speed Packet Access

HTML Hyper Text Markup Language

IFLS Inter Frequency Load Sharing

IP Internet Protocol

ISDN Integrated Services Digital Network


Iu UMTS interface between UTRAN and CN

Iub UMTS interface between RNC and RBS

Iur UMTS interface between RNCs

MB Mobility Behavior

Mu Management Interface

Mub Management Interface RANOS and RBS


Mun Management Interface RANOS and CN

Mur Management Interface RANOS and RNC

3
Mut Management Interface RANOS and RXI
OSS-RC Operations Support System - Radio & Core
OTP Open Telecom Platform
PDR Packet Data Router
PSint Packet Switched interactive
RAB Radio Access Bearer
RACH Reverse Link Access Channel
RANOS Radio Access Network Operation Support
RAN Radio Access Network
RAT Radio Access Technology
RBS Radio Base Station
RNC Radio Network Controller
RNH Radio Network Handler
RXI Radio access network aggregator
SAI Service Area Identifier
SC Start Cell
SNR Signal to Noise Ratio
SPB Special purpose Processor Board
TB Traffic Behavior
UEH User Equipment Handler
UE User Equipment
UMTS Universal Mobile Telecommunications System
URA UTRAN Registration Area
UTRAN UMTS Terrestrial RAN
Uu The interface between UTRAN and UE
WCDMA Wideband Code Division Multiple Access
tc init Initiating test case
tc init end End initiating test case
tc rob Robustness test case
tc rob vrf Verifying robustness test case

4
1 Introduction
This master thesis was carried out at Ericsson in Kista at the UEH (User Equip-
ment Handler) department within RNC design.

UEH is a subsystem of the control plane in the RNC that manages the UE.
The other major control plane subsystem of the RNC is RNH (Radio Network
Handler) which manages the radio network and creates the transport channels
in between the RNCs and the CN.

The user plane consists of the CCS, DSC and PDR subsystems. CCS controls
the Common Channel and DCS the Dedicated Channels. The PDR (Packet
Data Router) routes the traffic towards the CN.

The third generation mobile communication system (3G) supports both CS


(circuit-switched) and PS (packet-switched) traffic in contrary to prior systems
that tend to use separate subsystems for the different traffic types.

In other words the traditional telecommunication services and the evolving in-
ternet services are both fully integrated in the 3G system. The expansion in
terms of variety of bit rates and bandwidths are also crucial features of the
WCDMA (Wideband Code Division Multiple Access) network.

Figure 1: Interoperability of 3G WCDMA with 2G GSM systems [2]

In order to retain a stable continuous mobile service both 2G GSM (Global

5
System for Mobile communications) and 3G WCDMA work inter operatively,
see Figure 1. The RNC node is one of the NE (Network Elements) in the
WCDMA RAN (Radio Access Network). To enable collaboration in between
the two generations of mobile telecommunications, backward compatibility is a
key feature. More details can be found in [2].

1.1 Background
Due to requirements of higher speed data transfer in the 3G system, new ver-
sions of the software controlling the RNC is needed. These software updates
also includes new features. To ensure the new versions does not have negative
impact on performance or existing features, regression testing comes in handy.

The exception cases in each test scenario that can be evaluated exist in such
amount that is unfeasible to cover them all with fixed test scenarios. There-
fore random traffic is used to generate the behavior of the UEs. That involves
alternating sequences of calling, data sessions and idling, mobility in the RAN
network and simulated interruptions such as operation and maintenance.

Regardless of what fault that is triggered, it must be possible to reconstruct the


scenario in order to trace the root of the problem. This master thesis investi-
gates a way of accomplishing such an implementation.

The test cases are written in Erlang OTP (Open Telecom Platform) based test
framework. Erlang OTP comprises is a development environment for building
distributed real-time high availability systems. The actual testing is performed
with Common test, which is a framework for automated testing of arbitrary
target nodes.

1.2 Scope
• Learn how to write and execute RNC node level test cases in the Erlang
test framework

• Design a random test scenario using three UEs

• Find out how to record the sequence of actions done for each individual
UE

• Find out how to be able to rerun the exact same sequence of actions in
order to be able to recreate faults

6
2 System overview
2.1 Architecture

Figure 2: RAN system architecture overview [2]

The WCDMA RAN for UMTS (Universal Mobile Telecommunications System)


is the link between the CN and the UE, see Figure 2. The CN handles mobile
subscriber related inquiries, such as balances for prepaid cards and routing of
the calls.

The UE involves any type of mobile equipment, such as a laptop or a cell phone.
All UE contains a USIM (UMTS Subscriber Identity Module) that contains
information from the subscriber including authentication and encryption keys.
[6]

2.2 RNC
The RNC works like a coordinator for the different NE in the RAN. [4] The
following is the main functionality of the RNC:

• Manage the radio resources and monitor and handle the UE mobility.

• Decide when to execute a handover process - to another cell, frequency or


system (e g 3G to 2G).

• Control the RAB (Radio Access Bearer) state, which ensures adequate
present mode of the UEs. For example if the UE initiates a call, the
Speech RAB state is used, while the PsInt (Packet Switched Interactive)
RAB state is used when web browsing.

• Support for UE positioning service.

7
2.3 RAN interfaces

Figure 3: The Iu interface & the connected CN domains [2]

There are a bunch of different interfaces for the RAN to communicate with ex-
ternal devices, see Figure 3.

The Iu interface handles the communication between the RNC and the three
different domains of the CN - CS, PS, BD (Broadcast Domain).

The air interface Uu is the connection between the UE and the RBS.

The RAN also has some management interfaces that are IP-based - the Mu
interfaces, see Figure 4.

Mur (Management Interface RANOS (Radio Access Network Operation Sup-


port) and RNC) is the management interface provided by the RNC. The Mub
(Management Interface RANOS and RBS) is provided by the RBS. The Mun
(Management Interface RANOS and CN) is provided by the CN and within the
OSS-RC (Operations Support System - Radio & Core). The OSS-RC collects
data from the RNC and RBS and makes it available to the OSS-RC applica-
tions. The Mut (Management Interface RANOS and RXI) is provided by the
RXI (Radio access network aggregator), which is a type of multiplexer between
the RNC and RBS that handles different transport solutions.

The internal interfaces in the RAN for traffic and control signaling is the Iur and
Iub. The Iur is used by the RNC for internal communication in between mul-
tiple RNCs or RNS (Radio Network Subsystem), while the Iub is used for the
communication between the RNC and the RBS. Both these internal interfaces
can be used either with the ATM (Asynchronous Transfer Mode) technology or
by IP (Internet Protocol).

8
There are two types of protocol structures for the interfaces (internal & exter-
nal). One implementing the RAB services - the User Plane protocols. The other
manages the RABs and the connection between the UE and the rest of the RAN
- the Control Plane protocols. [2]

Figure 4: WCDMA Radio Access Network [11]

2.4 WCDMA RAN basic features


Maybe one of the most important feature is the emergency call feature. It is
possible to setup an emergency call, even in a congested RAN by rejecting reg-
ular calls.

To be able to initiate a call admission control is necessary. This also includes


incoming handover processes.

When using data packet services, the bandwidth demand tend to vary in time.
Therefore there are different RAB states depending on the activity. For heavy
usage a dedicated channel is assigned, while a switch to a common channel is
performed upon dropped usage. This feature that optimizes the available re-
sources is called channel switching. In addition the switch, to a higher or lower
bit rate channel, could take place depending on the coverage and throughput as
well.

The ciphering mode control is a feature handled by the CN to ensure secure


data transfers between the RNC and the UE. It also coordinates the ciphering
keys between the CNs. The currently used Kasumi algorithm (128 bits) was
conventioned already in 3GPP ’99 (3rd Generation Partnership Project).

Upon overload the congestion control feature is utilized. The feature can for
instance order a channel switch to release some resources or in worst case deny
new calls or even kick out some sessions. All actions is set with different prior-

9
ities depending on the grievousness of the congestion.

Another extensive feature for WCDMA to work is the power control. Since the
bandwidth is shared it is of great importance that all UE keep an appropriate
power level on basis of the corresponding position. For example less power is
required to maintain the desired SNR (Signal to Noise Ratio) for UEs close to
the RBS, compared to UEs at the cell border.

A positioning service is available through the Iu interface. It is based on the


SAI (Service Area Identifier). [5]

2.5 3Gsim

Figure 5: Testframework overview

3Gsim is a very complex environment offering high-level commands controlling


many simulated objects in one command. It is built on CPP (Cello Packet
Platform) and runs on a number of GPB (General purpose Processor Board)
and SPB (Special Purpose Processor Board), see Figure 5. The commands can
either be entered strait into the CLI (Command Line Interface) or executed
from a command file. In this thesis the commands are executed through a
telnet connection which is set up via Erlang. In other words the test framework
is used to manoeuvre 3Gsim (and the CPPemu). The complete 3Gsim manual
is available in [10].

2.6 Erlang
Erlang is a functional concurrent programming language, which the test cases
are written in. It was developed to build massively scalable soft real-time sys-
tems with requirements of high availability. Beyond the telecoms it is also used
within banking, computer telephony and instant messaging. A four day course
was held (and attended) in the middle of March (8-11). Parts of the course

10
material are available in reference [3]. Erlang has a telecommunication specific
platform which is called Erlang OTP with a set of Erlang libraries and design
principles that for example enables debugging and inter-language application
interface. Reference manual is available in [7].

2.7 Common test


Common test is a portable test server for black-box testing and can also be used
for white-box testing in OTP applications and Erlang programs. It provides the
possibility to run test suites automatically on local and remote targets in a large
scale. The results are presented in a HTML (Hyper Text Markup Language)
format. Common test has good prerequisites for regression testing, which are
utilized in this thesis. A two day course was held (and attended) in April (6-7).
Reference manual is available in [8].

11
3 Model

Figure 6: Cell configuration (and capabilities) of the Scenario

The scenario consists of three active UEs and one passive UE. The three UEs
have different traffic and mobility behaviors. One of them calls the fourth
passive UE. The RAN consists of two RBS on two different frequency bands,
each with a total of six cells divided into two cell groups of three cells. The
cells have various capabilities (the older standard R99 and the newer HSPA),
see Figure 6.

3.1 Test suite


The test suite consists of four main parts:
• tc init
• tc rob
• tc rob vrf
• tc init end
Where the first one sets up (initiates) the described cell configuration, defines
the traffic behaviors and the mobility behaviors.

The second, tc rob (robustness test case) activates three UEs, each specified
with its own random mobility and traffic behavior from tc init. Whereupon the
actual performed events are traced.

The third, tc rob vrf (verifying robustness test case) starts three UEs with the
custom mobility events recorded from tc rob. After which the events performed

12
could be verified with the input events.

The last, tc init end revokes the setup in tc init, to make it possible to run
different scenarios afterwards.

3.2 Traffic behavior


The traffic behavior defines which services the UEs will use.

Each traffic behavior is configured to loop when the duration (in seconds) of its
last traffic activity is elapsed.

The three traffic behaviors used are:

• psint fach ura fach sequentially alternating between the four RAB states:

– 4s int 64 64 PSint (Packet Switched interactive) 64/64 kb/s (down/up)


– 4s cch CCH (Control CHannel) Where the PSint is set up
– 4s int ura ura URA (UTRAN (UMTS Terrestrial RAN) Registration
Area) Disconnects Radio link but but keeps CN resources.
– 4s cch

• 3xPsIntEUL HS sequentially alternating between the five RAB states:

– 3s int eul hs PSint with EUL/HS (Enhanced UpLink/High Speed)


capabilities.
– 3s 2xint eul hs 2 parallel PSint connections
– 3s 3xint eul hs 3 parallel PSint connections
– 3s 2xint eul hs
– 3s int eul hs

• sp int sequentially alternating between the seven RAB states:

– 2s int eul hs
– 2s speech 12 2 int eul hs Speech CS using AMR (Adaptive Multi-
Rate audio codec) 12.2 kb/s + PSint with EUL/HS capabilities.
– 2s speech 12 2 int 0 0 Speech + FACH (Forward Link Access Chan-
nel) 0/0 kb/s (down/up)
– 2s speech 12 2 2xint eul hs Speech + 2 parallel PSint
– 2s speech 12 2 int eul hs
– 2s speech 12 2
– 2s speech 12 2 int eul hs

A complete list of available traffic behaviors are specified in the 3Gsim manual
[10].

13
3.3 Mobility behavior
The mobility behavior defines the way the UEs moves in the RAN.

The three mobility behaviors used are:

• random cells 3s
– leg change interval 3000
– fach cell reselection interval 3000
– ura cell reselection interval 3000
• random cells 4s
– leg change interval 4000
• random cells 5s
– leg change interval 5000

Where the three leg change interval specifies the number of milliseconds to wait
before randomly change location. The FACH (Forward Link Access Channel)
and URA (UTRAN (UMTS Terrestrial Radio Access Network) Registration
Area) reselection parameters are used in combination with traffic behaviors
containing CCH RABs to enable mobility of non DCH (Dedicated CHannel).

While randomly moving around in the UTRAN the RNC keeps a list of reach-
able cells and their current signal strengths. This is called the monitored set
cells. The cells currently in use are called the active set cells.

A complete list of available mobility behaviors are specified in the 3Gsim manual
[10].

3.4 Events
Mobility events are measurement reports, sent from the UE, intended to be a
decision basis for the RNC.

These are the mobility events in use:

1. Intra frequency events


1a. Include a new cell to AS (Active Set)
1b. Remove a cell from AS
1c. 1a + 1b
1d. Change of best cell
2. Inter frequency events
2a. Change of best frequency
2b. Current frequency bad, another frequency better
2d. Current quality of frequency bad (below threshold)

14
2f. Current quality of frequency good (above threshold)

3. Inter RAT (Radio Access Technology) events

3a. Like 2b but for UTRAN (UMTS Terrestrial RAN)

6. UE internal events

6b. UE transmitted power is not enough for coverage (same result as 2d)
6d. UE maximum transmittable power reached

3.5 Mobility file


A mobility file contains events underlying decisions of the UE handling made
by the RNC.

This is the form of the input to the mobility file generator (1),

[{”duration”, ”cell”, ”event”}, {”duration”, ”cell”, ”event”}, . . . ] (1)


where duration is the time in milliseconds to wait after executing the event, cell
is the ID of the cell, event is one of the events listed in 3.4.

If the event is one of the double events, i e 1c, the string cell consists of two cell
IDs, separated with a dash, e g ”1014-1011”. Events where the cell is implied,
the cell string will solely contain a dash ”-”.

Instead of defining a mobility behavior, in the 3Gsim command that creates the
UE, a mobility file can be specified. This is utilized in the tc rob vrf test case.

3.6 Cells
When an UE is created with mobility a start cell is specified. Depending on
which mobility event received from the UE, the RNC makes a decision whether
change of frequency or cell is appropriate. If a cell does not have support for
HSPA (High Speed Packet Access) and the UE requests a change to DCH the
RNC will take the decision to make a HHO (Hard HandOver) to the corre-
sponding cell on the other frequency band within the same location.

3.7 Configuration & fine tuning


Initially the time interval for the three UEs were equally spaced with two, three
and four seconds respectively for the traffic behavior. The interval for the mobil-
ity behaviors were set to four, three and five seconds. Unfortunately there were
some issues with the concurrent execution of the commands in 3Gsim, which
led to a solution with behaviors containing intervals that did not match the
multiples of the other UEs. Later on a checkpoint upgrade was performed and
this did no longer seem to affect the outcome and were consequently changed
back to its initial values.

15
The 3Gsim command (2) stops all UEs.

3gsim stou − i all (2)

This is executed before the end of the simulation. Unfortunately the command
caused 3Gsim to hang. A possible solution was to stop the UEs one by one (3)
to prevent the hanging. This approach was tried out, but was not as successful
as reckoned.

3gsim stou − i 000001


(3)
...

A lot of synchronization problems arose as a consequence to a checkpoint up-


grade of the network, which triggers a version change in both 3Gsim and the
RNC node. This affected the whole test department for a several weeks and
caused problems to run traffic at all. The upgrade was necessary to be able
to make use of the new functions that the test case required. One possible
workaround to this was to reset the RBS and redefine them again. But that
did not seem to have the desired effect on the synchronization problems. Later
on another attempt was applied to fix this issue. The approach was to restart
3Gsim after changing the SPM (Special Purpose Processor Module) allocation
for all cells to reside on the same SPB (Special Purpose Processor Board). Un-
fortunately, this did not cure the problems ether. Finally the fault was isolated
to the Iub frame synchronization triggered by 3Gsim.

In combination with the synchronization problems the license key for the RNC
application expired, which contributed to some errors that was quite hard to
track, because there were no error message generated by the void license key.

To facilitate verification of the test case runs two post checks were added to
the suite tc rob postcheck tgsim and tc rob postcheck exc err. Where the prior
shows exceptions in 3Gsim. For example if incorrect RAB states were estab-
lished or a mobility event could not be performed. While the latter shows the
if there were any exception errors in the RNC. Two of these post checks were
also added to the reconstructing test case.

There was a delay in the start of the random mobility of approximately 4.5
seconds compared to the fixed mobility that started immediately. Therefore a
start delay was added to the mobility file to compensate for this.

This turned out to be harder to specify than just changing the start delay of
the mobility events once. Sometimes when the emulator was restarted the start
time was drifting which required a reconfiguration of the delays that was really
time consuming.

16
4 Results
The test case tc rob parsed the output of the 3Gsim log and created a mobility
file successfully.

In the test case tc rob vrf the scenario was reconstructed by using the mobility
file generated in tc rob with some difficulty. Sometimes the UEs hanged which
resulted in a discontinuation of execution of all remaining mobility events.

The hangings were in most cases caused by the mobility event 2b, when the
cell the event intended to change to was not listed in the monitored set cells,
because the measurement report, sent by the UE, arrived of some reason at the
very same moment (millisecond) as the change of frequency was ordered. Since
the precision of the execution was not sufficient (below one millisecond), a 50 ms
delay was introduced before any 2b events was executed. This was compensated
by subtracting 50 ms from the event after to prevent affection of the remaining
events.

Initially the start cells were set manually. But in order to reduce affection of
the different capabilities of the cells, a function choosing random start cells for
each UE was implemented.

Even if the delays were configured properly upon every restart, there were non-
executing events, mostly because the scenario looked differently for every test
run. One set of configurations with random start cells and 6900, 9150 and 10250
milliseconds start delay of the mobility for the three UEs respectively, gave the
result presented in Table (1). The table shows one test run per line with the
amount of executed mobility events in respective test case. The right column
tells whether there was a match between the test cases or not. The gray back-
ground indicates that the whole test case was reconstructed successfully.

Another set of configurations with random start cells and 2400, 3400 and 4400
milliseconds start delay of the mobility for the three UEs respectively, gave the
result presented in Table (2).

The FACH and URA reselection intervals in the mobility behavior for the first
UE did not work properly, because reselection of cells in URA and FACH is just
possible with random mobility, and cannot be specified in custom mobility. So
the reselection interval for URA and FACH were set to 100 000 ms to prevent
change of active cell during URA and FACH.

Yet another error was discovered. 3Gsim random mobility generates incorrect
events in combination with Hard Handover. 3Gsim is sending mobility 2d to
make a cell the best cell even though it is no longer part of the active set. A TR
(Trouble Report) has been issued on 3Gsim and until it is solved, HHO have to
be disabled and thus also the inter frequency coverage relations. Table 3 shows
the result of those test runs.

Since the inter frequency coverage relations might have changed the premises
of the test, a test without the delay for the 2b events were run. The results are

17
rob rob vrf rob == rob vrf != 0
UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3
3 5 4 2 3 4 1
4 5 4 0 5 4 1 1
0 4 4 0 4 4 1 1
7 5 4 4 3 2
8 4 4 0 4 4 1 1
2 5 4 2 5 4 1 1 1
2 4 4 2 4 4 1 1 1
1 5 5 0 1 2
6 5 5 1 3 3

0 5 4 0 2 2
3 4 4 2 2 2
3 5 3 1 5 3 1 1
7 4 5 1 4 3 1
5 5 4 0 1 4 1
1 5 5 1 5 5 1 1 1
5 6 4 2 4 4 1
3 6 4 1 1 2
3 4 5 2 4 2 1

6 4 5 6 4 5 1 1 1
8 4 5 8 4 2 1 1
0 5 3 0 5 2 1
2 5 4 2 5 4 1 1 1
7 6 4 2 1 3
4 4 4 2 4 4 1 1
1 4 4 1 4 4 1 1 1
0 5 4 0 1 4 1
4 5 4 4 1 3 1
25% 64% 59%

Table 1: Success rate (number of mobility events) for test runs with start delay
6900, 9150 & 10250 ms. (Crashed test runs suppressed.)

18
rob rob vrf rob == rob vrf != 0
UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3
4 15 12 2 15 5 1
9 13 9 11 13 5 1
10 12 8 10 3 8 1 1
6 12 9 3 5 5
7 12 9 8 11 9 1
6 10 14 10 1 2

3 10 10 2 10 10 1 1
8 10 9 3 1 5
6 15 12 10 1 2
5 12 11 3 12 11 1 1
9 12 7 8 8 5
6 13 12 6 10 1 1
10 11 9 6 8 5
15% 31% 31%

Table 2: Success rate (number of mobility events) for test runs with start delay
2400, 3400 & 4400 ms. (Crashed test runs suppressed.)

rob rob vrf rob == rob vrf != 0


UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3
8 12 10 8 12 10 1 1 1
7 15 9 2 3 5
9 11 10 8 7 10 1
7 14 10 2 3 1
7 13 10 6 1 5
20% 20% 40%

Table 3: Success rate (number of mobility events) for test runs wihout inter
frequency coverage relations. (Crashed test runs suppressed.)

19
shown in Table 4.

A suspected fault regarding the reuse of the tc init run in between each test
case led to another test run with tc init end included in each test group to reset
the network. Results are shown in Table 5.

20
rob rob vrf rob == rob vrf != 0
UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3
7 11 12 4 7 5
7 14 14 4 3 1
9 12 11 8 3 2
8 13 13 8 13 2 1 1
7 10 11 6 5 11 1
5 10 13 4 10 1 1
8 13 10 8 5 10 1 1
8 9 11 8 9 11 1 1 1
6 15 9 4 7 6
7 9 14 8 7 2
6 12 11 2 3 2
3 14 12 6 14 1 1
4 12 9 2 5 6
7 12 10 4 10 10 1
8 13 10 8 7 5 1
5 12 7 6 5 5
3 12 12 2 5 12 1

10 11 8 10 11 8 1 1 1
10 12 10 10 12 9 1 1
5 14 10 7 7 8
8 10 12 8 10 9 1 1
8 12 7 6 5 5
3 13 9 2 13 3 1
10 9 10 10 7 10 1 1
6 12 13 4 12 1 1
8 14 10 8 3 10 1 1
10 11 12 8 11 4 1
3 13 11 2 13 11 1 1
8 12 11 6 12 5 1
6 12 12 4 1 8
9 16 8 8 8 5
6 12 12 4 12 2 1
7 12 10 10 12 1 1
10 11 10 8 11 6 1
26% 44% 26%

Table 4: Success rate (number of mobility events) for test runs without 2b delay.
(Crashed test runs suppressed.)

21
rob rob vrf rob == rob vrf != 0
UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3
10 14 9 6 13 9 1
6 13 11 10 13 11 1 1
8 11 10 8 5 10 1 1
10 11 12 10 3 2 1
6 12 11 2 6 5
10 12 9 10 5 9 1 1
5 14 10 8 3 2
8 16 9 8 3 2 1
8 13 10 8 13 10 1 1 1
9 15 7 6 10 5

5 12 11 2 8 5
10 14 10 10 3 5 1
9 13 10 8 10 10 1
9 11 7 10 11 3 1
7 15 12 6 6 5
8 11 8 3 9 4
7 13 7 4 13 7 1 1
5 12 10 2 5 7
3 13 7 2 3 7 1
30% 20% 40%

Table 5: Success rate (number of mobility events) for test runs with tc init end
included. (Crashed test runs suppressed.)

22
5 Conclusions
Due to timing inconsistency an exact scenario is hard to regenerate in this sim-
ulated environment. But to regenerate a scenario that will trigger roughly the
same scenario, hopefully triggering the same faults, is possible under the right
circumstances.

One prerequisite is that the initial mobility event will be executed at the same
time for all runs of the tc rob vrf cases. Another is that the random mobility
renders correct events. Today 3Gsim generates faulty events, which leads to
the infeasibility of the custom mobility to generate the same (faulty) sequence
of events. In other words the few times 3Gsim manages to generate the events
correctly the custom mobility will be able to reconstruct that scenario and con-
sequently pass that particular test run.

One of the faulty behaviors showed when the random mobility executed events
at the exact same millisecond, which should not be possible. For the reconstruct-
ing test case to be able to rerun the same scenario it has to have a precision of
less than one ms. For a realistic scenario 100 ms or at most 50 ms of precision
could be achieved, because the time to establish or change a RAB state slightly
varies. Sometimes this problem arises with a few milliseconds difference, which
still makes it very difficult to get exact same sequence. The most frequently
events with this behavior is the 1d and 2d events.

One way to ensure the premises are fulfilled is simply to disregard the test runs
where the delay differs between tc rob and tc rob vrf. The disadvantage of this
method is that it will require a lot of test runs in order to be able to draw some
conclusions whether the suite fulfills the criterion.

Further with this method we do not know how many tests to be run to get one
useful case. But that can be solved by making a function that checks if the prior
test run had matching initial events.

Another thing to take into account is what size of the delay to accept to consider
it as a successful one. This can be tricky because in a simulated environment
there will always be some time difference. A rule of thumb could be to at most
accept a third of the smallest trigger or interval of the traffic/mobility behaviors.

Since the timing is different results are varying a lot, external help for analyzing
what the source of the fault is needed. One strategy is to modify the timing of
the random mobility events in order to prevent the executed events to be too
tight. Although this will require a new revision of the whole 3G simulator.

Until then the only decent solution seems to try out a tremendous amount
of parameters in 3Gsim and the RNC in hope for a combination that gives a
precision sufficient to recreate the scenario.

23
6 Discussion
Further investigation of whether the license based tool QuviQ check [9], that is
used for automated testing, could be utilized to run a regression test of the kind
performed in this thesis.

Quviq check also comes with the advantage that it is able to test against mod-
els of mobility. That enables verification of the cell capabilities utilization. For
example it would be possible to discover passed test cases handled in a non
optimal way.

Due to the varying success when running test cases with identical setup, there
is most definitely something that is misconfigurated in the environment.

In order to find out if there is a way to solve the environment issues and suppress
the time difference between the initial event of tc rob and tc rob vrf expert
advice of 3Gsim has to take place.

24
Appendix
This master thesis was supervised by

• Johan Lundberg at Ericsson

• Tobias Oechtering at the Royal Institute of Technology

25
References
[1] Exjobb RNC Node Regression test suite Johan Lundberg, Ericsson AB
December 12, 2010

[2] WCDMA RAN 137/1551-HSD 101 02 Uen C Ericsson AB


December 9, 2010

[3] Erlang Crash Course Peter Andersson, Ericsson AB


September, 2006

[4] RNC Introduction Flow LZU00000455 Ericsson AB


Rev 1A

[5] WCDMA RAN Protocols and Procedures LZU 108 5886 R5B Ericsson AB
2006

[6] Ericsson WCDMA System Overview 1055469 Ericsson AB


January 22, 2008

[7] Erlang OTP reference manual http://demo.erlang.org/erldoc


April 11, 2011

[8] Common test http://erlang.org/doc/apps/common test/


April 11, 2011

[9] QuviQ check http://quviq.com/


April 11, 2011

[10] 3Gsim User’s Guide 1553-LZT 123 7595 rev BN


January 25, 2011

[11] WCDMA RAN 2/22105-FGB 101 135 Uen Rev H Ericsson AB


April 21, 2005

26
Test suite
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #0. BASIC INFORMATION
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%%===================================================================
%%% F i l e : ueh robustness SUITE . e r l
%%%
%%% D e s c r i p t i o n : T e s t S u i t e c o n t a i n i n g randomized r o b u s t n e s s t e s t c a s e
%%% m a i n l y w i t h UEH f o c u s
%%%
%%%===================================================================

−module ( u e h r o b u s t n e s s S U I T E ) .

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #2. EXPORT TESTCASES
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%==========================================
%% T e s t s e r v e r c a l l b a c k s .
%% S e e e a c h f u n c t i o n below
%%==========================================

−e x p o r t ( [ a l l / 0 , %% mandatory
s u i t e /0 , %% optional
groups /0 , %% optional
i n i t p e r s u i t e /1 , %% optional
e n d p e r s u i t e /1 , %% optional
i n i t p e r g r o u p /2 , %% mandatory i f groups are d e f i n e d
end per group /2 , %% mandatory i f groups are d e f i n e d
i n i t p e r t e s t c a s e /2 , %% optional
end per testcase /2]). %% optional

%%==========================================
%% T e s t c a s e s
%% D e f i n e s a l l t e s t c a s e s .
%% F u n c t i o n s w i t h o u t arguments ( xxx / 0 ) a r e o p t i o n a l .
%%==========================================

−e x p o r t ( [ t c r o b / 1 ,
t c r o b v r f /1 ,
p a r s e 3 g s i m l o g /2 ,
t c i n i t /1 ,
t c i n i t e n d /1 ,
t c r o b p o s t c h e c k t g s i m /1 ,
t c r o b v r f p o s t c h e c k t g s i m /1 ,
t c r o b p o s t c h e c k e x c e r r /1 ,
tc rob vrf postcheck exc err /1]).

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #3. INCLUDE FILES
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%==========================================
%% Mandatory i n c l u d e f i l e s
%%==========================================

− i n c l u d e l i b ( ” common test / i n c l u d e / c t . hrl ”).


−i n c l u d e ( ” / vobs / r n c / u t e U s e r s / r c c / r c c support / include / rcc def . hrl ”).
−i n c l u d e ( ” / vobs / r n c / u t e U s e r s / r c c / r c c support / include / rcc support . hrl ”).
−i n c l u d e ( ” / vobs / r n c / u t e U s e r s / r c c / r c c support / include / rcc config . hrl ”).

%%==========================================
%% My i n c l u d e d f i l e s
%%==========================================

%%==========================================
%% My d e f i n e s
%%==========================================

28
−d e f i n e (RNC DELAY,
c h o o s e ( c t : g e t c o n f i g ( h o s t ) == c t : g e t c o n f i g ( t g s h o s t ) , 0 , 0 ) ) .
−d e f i n e (CU TIMEOUT, 5 0 0 0 ) . %t y p i c a l l y 3 s
−d e f i n e (STOU TIMEOUT, 1 8 0 0 0 0 ) . %t y p i c a l l y 80−120 s

%% I f u s i n g r e a l o r emu RNC

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #4. SUITE LEVEL DEFINITIONS
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%%===========================================================================
%% @spec a l l ( )
%%
%% −> GroupsAndTestCases | { s k i p , Reason }
%%
%% where
%% GroupsAndTestCases = [ { group , GroupName} | T e s t C a se ]
%% GroupName = atom ( )
%% T e s t C a se = atom ( )
%% Reason = term ( )
%%
%% @doc
%% Return a l i s t i n which o r d e r t h e t e s t c a s e g r o u p s and
%% t h e t e s t c a s e s a r e t o be run .
%% Note : i f a t e s t c a s e i s n o t l i s t e d i t wont be e x e c u t e d .
%% @end
%%%===========================================================================
a l l ( ) −>
[ { group , t g r p a l l } ] .

%% Adding s u i t e l e v e l d e f i n i t i o n
s u i t e ( ) −>
[ { t i m e t r a p , { hours , 5 } } ,
{ userdata ,[{ level , s i t e }]} ,
{ s t y l e s h e e t , ”/home/ e n i k r y g / p u b l i c h t m l / l o g s t y l e s h e e t . c s s ” } ] .

%%%===========================================================================
%% @spec i n i t p e r s u i t e ( C o n f i g 0 )
%%
%% −> C o n f i g 1 | { s k i p , Reason } | { s k i p a n d s a v e , Reason , C o n f i g 1 }
%%
%% where
%%
%% ConfigX = [ t u p l e ( ) ]
%% Reason = term ( )
%%
%% @doc
%% <pre>
%% i n i t p e r s u i t e c o n t a i n s i n i t i a l i z a t i o n s
%% t h a t a r e common f o r a l l t e s t c a s e s i n t h e s u i t e ,
%% and t h a t a r e o n l y t o be p e r f o r m e d o n c e . The f o l l o w i n g i s done :
%%
%% − Open t e l n e t p o r t t o RNC and 3Gsim
%% − Open MoShell p o r t t o RNC
%% − S t a r t t i m e s e r v e r on CPPemu
%% − S t a r t t i m e s e r v e r on CPPemu
%% − B u i l d up board l i s t i n RNC MoShell w i t h command BP a l l .
%% </pre>
%% @end
%%%===========================================================================
i n i t p e r s u i t e ( C o n f i g ) −>

%% Enable l o g g i n g o f a l l commands t o CT l o g
udda log : p r e t t y p r i n t c t ( true ) ,

%% Compile r e q u i r e d modules
ok = ?RCC MAKE RCC,

29
%% C a l l s t a n d a r d ueh i n i t f u n c t i o n
ConfigUpdated = u e h h e l p e r : i n i t p e r s u i t e u e h ( C o n f i g ) ,

%% Add any t e s t suite specific init actions here

%% Return t e s t s u i t e c o n f i g
[ { c o n f , r a n d o m c o n f ( ) } | ConfigUpdated ] .

%%%===========================================================================
%% @spec e n d p e r s u i t e ( C o n f i g 0 )
%%
%% −> v o i d ( ) | { s a v e c o n f i g , C o n f i g 1 }
%%
%% where
%%
%% ConfigX = [ t u p l e ( ) ]
%%
%% @doc
%% <pre>
%% e n d p e r s u i t e i s meant t o be u s e d f o r c l e a n i n g up
%% a f t e r i n i t p e r s u i t e . The f o l l o w i n g i s done :
%%
%% − C l o s e t e l n e t p o r t t o RNC and 3Gsim
%% − C l o s e MoShell p o r t t o RNC
%% − D e l e t e p o s t c h e c k c o n t r o l f i l e
%% </pre>
%% @end
%%%===========================================================================
e n d p e r s u i t e ( C o n f i g ) −>

%% T e s t s u i t e specific init actions

%% C a l l s t a n d a r d f u n c t i o n t o c l o s e mos and t e l n e t connections


%% and d i s a b l e s t a n d a r d t r a c e s
ok = u e h h e l p e r : e n d p e r s u i t e u e h ( C o n f i g ) ,

ok .

%%%===========================================================================
%% @spec i n i t p e r t e s t c a s e ( TestCase , C o n f i g 0 )
%%
%% −> C o n f i g 1 | { s k i p , Reason } | { s k i p a n d s a v e , Reason , C o n f i g 1 }
%%
%% where
%%
%% T e s t C a se = atom ( )
%% ConfigX = [ t u p l e ( ) ]
%% Reason = term ( )
%%
%% @doc
%% <pre>
%% T h i s p a r t c o n t a i n s a c t i o n s which must be done b e f o r e e a c h t e s t c a s e .
%% The f o l l o w i n g i s done :
%%
%% − A c h e c k i s made t o s e e i f t h e t e s t c a s e name i s ” t c i n i t ” o r
%% ” t c i n i t e n d ” . No a c t i o n i s p e r f o r m e d f o r t h o s e t e s t c a s e s .
%% − Then a c h e c k i s made t o s e e i f t h e c u r r e n t t e s t c a s e i s a p o s t c h e c k
%% t e s t c a s e by c h e c k i n g f o r s t r i n g ” p o s t c h e c k ” i n t h e t e s t c a s e name .
%% − I f i t i s n o t a p o s t c h e c k t e s t c a s e , t h e f o l l o w i n g a c t i o n s a r e done :
%% − Target monitor i s s t a r t e d .
%% − MoShell undo mode i s s t a r t e d t o s a v e undo commands t o a f i l e .
%% − T e s t c a s e name , s t a r t t i m e and a l l o w e d p o s t c h e c k t e s t c a s e s a r e w r i t t e n
%% to the postcheck c o n t r o l f i l e .
%%
%% − I f i t i s a p o s t c h e c k t e s t c a s e , t h e f o l l o w i n g a c t i o n s a r e done :
%% − A s e a r c h f o r t h e whole t e s t c a s e name i s done i n t h e p o s t c h e c k c o n t r o l
%% file .
%% − I t i s c h e c k e d i f t h e main t e s t c a s e r e t u r n e d ”TcOk ” .
%% − I f both c r i t e r i a s above a r e f u l f i l l e d , t h e p o s t c h e c k t e s t c a s e i s run ,
%% otherwise i t i s skipped .
%%
%% </pre>

30
%% @end
%%%===========================================================================
i n i t p e r t e s t c a s e ( t c i n i t , C o n f i g ) −>
u e h h e l p e r : i n i t p e r t e s t c a s e u e h ( t c i n i t , C o n f i g , ?MODULE) ;

i n i t p e r t e s t c a s e ( t c i n i t e n d , C o n f i g ) −>
u e h h e l p e r : i n i t p e r t e s t c a s e u e h ( t c i n i t e n d , C o n f i g , ?MODULE) ;

i n i t p e r t e s t c a s e ( TestCase , C o n f i g ) −>
u e h h e l p e r : c h e c k t c i n i t r u n ( C o n f i g , ?MODULE) ,
TgsPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC TGS PID , C o n f i g ) ,
RncPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC RNC PID , C o n f i g ) ,
MonConf = c t : g e t c o n f i g ( r n c m o n i t o r ) ++
[{ telnet , ct : g e t c o n f i g ( host ) } ] ,

MonConfTgs= c t : g e t c o n f i g ( t g s m o n i t o r ) ++
[{ telnet , ct : get config ( tgs host )}] ,

NewConfig = [ { ?RCC TESTCASE, T e s t C a se } | C o n f i g ] ,


{ok , RncMonPid} = r c c t h : i n i t t m ( NewConfig , ?RCC RNC MONITOR) ,
{ok , TgsMonPid} = r c c t h : i n i t t m ( NewConfig , ?RCC TGS MONITOR) ,
{ok , } = r c c m o s : s t a r t m o s u n d o m o d e ( NewConfig ) ,

c a s e RncMonPid o f
u n d e f i n e d −>
%% T h i s i s p o s t c h e c k t e s t c a s e − do n o t h i n g
ok ;
−>
%% Stop and d e l e t e a l l UE’ s i n c a s e some a r e h a n g i n g from p r e v i o u s
%% c r a s h e d t e s t c a s e
r c c t g s : s t o p d e l u e ( TgsPid , ” a l l ” ) ,
%% S t a r t t a r g e t m o n i t o r
cpp tm : s t a r t m o n i t o r ( RncMonPid , MonConf , RncPid ) ,
cpp tm : s t a r t m o n i t o r ( TgsMonPid , MonConfTgs , TgsPid ) ,

%% Add t h e c o d e f o r e x t r a t r a c e s
MosPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC MOS PID , NewConfig ) ,
r c c t h : s t a r t c o n f i g t r a c e s ( TestCase , C o n f i g , MosPid )
end ,

%% Return c o n f i g p a r a m e t e r s
[ { t e s t c a s e , T e st C a s e } ,
{?RCC RNC MON PID, RncMonPid } ,
{?RCC TGS MON PID , TgsMonPid} | NewConfig ] .

%%%===========================================================================
%% @spec e n d p e r t e s t c a s e ( TestCase , C o n f i g 0 )
%%
%% −> v o i d ( ) | { s a v e c o n f i g , C o n f i g 1 } | { f a i l , Reason }
%%
%% where
%% T e s t C a se = atom ( )
%% ConfigX = [ t u p l e ( ) ]
%% Reason = term ( )
%%
%% @doc
%% <pre>
%% T h i s p a r t c o n t a i n s a c t i o n s which must be done a f t e r e a c h t e s t c a s e .
%% The f o l l o w i n g i s done :
%%
%% − A c h e c k i s made t o s e e i f t h e t e s t c a s e name i s ” t c i n i t ” o r
%% ” tc init end ”.
%% No a c t i o n i s p e r f o r m e d f o r t h o s e t e s t c a s e s .
%% − Then a c h e c k i s made t o s e e i f t h e c u r r e n t t e s t c a s e c o n t a i n s s t r i n g
%% ” postcheck ”.
%% − I f i t i s n o t a p o s t c h e c k t e s t c a s e , t h e f o l l o w i n g a c t i o n s a r e done :
%% − Target monitor i s stopped .
%% − Any r e m a i n i n g UE’ s a r e s t o p p e d and d e l e t e d i n 3Gsim .
%% − A l l Mo c h a n g e s a r e r e s t o r e d by r u n n i n g t h e t e s t c a s e undo f i l e .
%% − The end t i m e and t e s t c a s e v e r d i c t i s w r i t t e n t o t h e p o s t c h e c k c o n t r o l
%% file .
%%

31
%% − I f i t i s a p o s t c h e c k t e s t c a s e , no a c t i o n s a r e done .
%% </pre>
%% @end
%%%===========================================================================

e n d p e r t e s t c a s e ( t c i n i t , C o n f i g ) −>
Config ;
e n d p e r t e s t c a s e ( t c i n i t e n d , C o n f i g ) −>
Config ;

e n d p e r t e s t c a s e ( TestCase , C o n f i g ) −>
RncPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC RNC PID , C o n f i g ) ,
RncMonPid = r c c s u p p o r t : g e t h a n d l e ( ?RCC RNC MON PID, C o n f i g ) ,
ModuleBoards = r c c s u p p o r t : g e t b o a r d s ( module , C o n f i g ) ,

= rcc support : c l e a n i f t e s t c a s e c r a s h ( Config ) ,

c a s e RncMonPid o f
u n d e f i n e d −>
%% T h i s i s p o s t c h e c k t e s t c a s e − do n o t h i n g
ok ;
−>
%% Remove t r a c e s
r c c t h r u n : s t o p u e i d t r a c e ( RncPid , ModuleBoards ) ,
r c c t h : s t o p t m ( C o n f i g , ?RCC RNC MONITOR) ,
r c c t h : s t o p t m ( C o n f i g , ?RCC TGS MONITOR) ,
rcc mos : stop mos undo mode ( Config ) ,

%% Remove any custom t r a c e s


MosPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC MOS PID , C o n f i g ) ,
r c c t h : s t o p c o n f i g t r a c e s ( TestCase , C o n f i g , MosPid )
end ,

Config .

%%%===========================================================================
%% @spec g r o u p s ( ) −> [ Group ]
%%
%% @doc
%% <pre>
%% Group = {GroupName , P r o p e r t i e s , GroupsAndTestCases }
%% GroupName = atom ( )
%% P r o p e r t i e s = [ p a r a l l e l | s e q u e n c e | S h u f f l e | { RepeatType , N} ]
%% GroupsAndTestCases = [ Group | { group , GroupName} | T e s t C a se ]
%% T e s t C a se = atom ( )
%% S h u f f l e = s h u f f l e | { s h u f f l e , Seed }
%% Seed = { integer () , integer () , integer ()}
%% RepeatType = repeat | r e p e a t u n t i l a l l o k |
%% r e p e a t u n t i l a l l f a i l | repeat until any ok |
%% repeat until any fail
%% N = integer () | forever
%%
%% D e s c r i p t i o n :
%% A t e s t c a s e group i s a s e t o f t e s t c a s e s t h a t s h a r e
%% c o n f i g u r a t i o n f u n c t i o n s and e x e c u t i o n p r o p e r t i e s .
%%
%% To s p e c i f y i n which o r d e r g r o u p s s h o u l d be e x e c u t e d
%% ( a l s o with r e s p e c t to t e s t c a s e s that a r e not part
%% o f any group ) , t u p l e s on t h e form { group , GroupName}
%% s h o u l d be added t o t h e a l l /0 l i s t .
%%
%% Return a l i s t o f group d e f i n i t i o n s .
%% </pre>
%% @end
%%%===========================================================================
g r o u p s ( ) −>
[{ tgrp init , [ ] ,
[ tc init ]} ,

{ tgrp rob , [ sequence ] ,


[ tc rob ,
{ tgrp rob pc , [ p a r a l l e l ] ,
[ tc rob postcheck tgsim , tc rob postcheck exc err ]}]} ,

32
{ tgrp rob vrf , [ sequence ] ,
[ tc rob vrf ,
{ tgrp rob vrf pc , [ parallel ] ,
[ tc rob vrf postcheck tgsim , tc rob vrf postcheck exc err ]}]} ,

{tgrp init end , [ ] ,


[ tc init end ]} ,

{ tgrp tcs , [ ] ,
[{ tgrp tc , [ sequence ] , [ tc rob , t c r o b v r f ] } ,
{ tgrp pc , [ p a r a l l e l ] ,
[ tc rob postcheck tgsim , tc rob postcheck exc err ,
tc rob vrf postcheck tgsim , tc rob vrf postcheck exc err ]}]} ,

{tgrp all , [] ,
[ t c i n i t , { group , tgrp tcs } , tc init end ] } ] .

%%%===========================================================================
%% @spec i n i t p e r g r o u p ( GroupName , C o n f i g 0 )
%%
%% −>
%% C o n f i g 1 | { s k i p , Reason } | { s k i p a n d s a v e , Reason , C o n f i g 1 }
%%
%% where
%% GroupName = atom ( )
%% ConfigX = [ tuple ( ) ]
%% Reason = term ( )
%%
%% @doc
%% <pre>
%% i n i t p e r g r o u p i s c a l l e d b e f o r e e a c h t e s t c a s e
%% i n t h e s u i t e . I t t y p i c a l l y c o n t a i n s i n i t i a l i z a t i o n
%% which must be done f o r e a c h t e s t c a s e .
%%
%% Note t h a t i n i t p e r t e s t c a s e i s a l s o e x e c u t e d , no m a t t e r i f t h e c a s e
%% b e l o n g s t o a group o r n o t .
%%
%% Return a l i s t o f c o n f i g u r a t i o n param / v a l u e t u p l e s .
%% </pre>
%% @end
%%%===========================================================================
i n i t p e r g r o u p ( GroupName , C o n f i g ) −>
%% I n i t i a l i z a t i o n needed f o r t h e group
c t : comment(”−−−−−−−−−− −−−−−−−−−− −−−−−−−−−−”),
Config .

%%%===========================================================================
%% @spec e n d p e r g r o u p ( GroupName , C o n f i g 0 )
%%
%% −>
%% v o i d ( ) | { s a v e c o n f i g , C o n f i g 1 } | { f a i l , Reason }
%% where
%%
%% GroupName = atom ( )
%% ConfigX = [ tuple ( ) ]
%% Reason = term ( )
%%
%% @doc
%% <pre>
%% e n d p e r g r o u p i s c a l l e d a f t e r e a c h t e s t c a s e ha s
%% f i n i s h e d , g i v i n g t h e o p p o r t u n i t y t o p e r f o r m c l e a n −up
%% a f t e r i n i t p e r g r o u p .
%%
%% Note t h a t i n i t p e r t e s t c a s e i s a l s o e x e c u t e d , no m a t t e r i f t h e c a s e
%% b e l o n g s t o a group o r n o t .
%%
%% Return ok .
%% </pre>
%% @end
%%%===========================================================================

33
e n d p e r g r o u p ( GroupName , C o n f i g ) −>
%% Cleanup what was i n i t i a t e d i n i n i t p e r g r o u p
c t : comment(”−−−−−−−−−− −−−−−−−−−− −−−−−−−−−−”),
ok .

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #5. TEST CASES
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%%===========================================================================
%% @spec t c i n i t ( C o n f i g 0 )
%%
%% −>
%% ok | e x i t ( ) | { s k i p , Reason } | {comment , Comment} |
%% { s a v e c o n f i g , C o n f i g 1 } | { s k i p a n d s a v e , Reason , C o n f i g 1 }
%%
%% where
%%
%% ConfigX = [ t u p l e ( ) ]
%% Reason = term ( )
%% Comment = term ( )
%%
%% @doc
%% <pre>
%% T h i s i s an i n i t t e s t c a s e s p e c i f i c a l l y f o r t h e r o b u s t n e s s t e s t s u i t e .
%% I t must be e x e c u t e d b e f o r e any o f t h e o t h e r t e s t c a s e s .
%% i n i t p e r t e s t c a s e and e n d p e r t e s t c a s e w i l l n o t be run f o r t h i s TC.
%% The f o l l o w i n g i s done :
%%
%% − MoShell undo mode i s s t a r t e d
%% − A c t i v a t e t h e r e q u i r e d f e a t u r e s
%% − S e t c h a n n e l s w i t c h i n g t i m e r s t o low v a l u e s i n o r d e r t o t r i g g e r
%% downswitch and f a i l e d t e s t c a s e due t o t h r o u g h p u t p r o b l e m s .
%%
%% </pre>
%% @end
%%%===========================================================================
t c i n i t ( C o n f i g ) −>

TgsPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC TGS PID , C o n f i g ) ,


MosPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC MOS PID , C o n f i g ) ,

%% Setup RNC C o n f i g u r a t i o n

%%===========================================
%% S t a r t undo mode
%%===========================================
u e h h e l p e r : o p e n t c i n i t u n d o f i l e ( C o n f i g , ?MODULE) ,

%% D i s a b l e MoShell c o n f i r m a t i o n f o r b l / deb / s e t
{ok , } = cpp mos : e x p e c t ( MosPid ,
” uv b l d e b s e t c o n f i r m a t i o n =0” ,
[ ” b l d e b s e t c o n f i r m a t i o n =0”] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% R e s t o r i n g U t r a n C e l l c h a n g e s from RABest t e s t s u i t e s i n c e s e t t i n g s
%% have been s a v e d i n CV by m i s t a k e
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=Iub −8−1 t c e l l 3 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=iub −8−1 u a r f c n D l 1 0 5 6 2 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=iub −8−1 u a r f c n U l 9 6 1 2 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=iub −8−2 t c e l l 4 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=iub −8−2 u a r f c n D l 1 0 5 6 2 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” s e t u t r a n c e l l=iub −8−2 u a r f c n U l 9 6 1 2 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t U t r a n C e l l=Iub −7−3 t r a n s m i s s i o n S c h e m e 0 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

34
%% A c t i v a t e t h e r e q u i r e d features

%% S e t f e a t u r e s t a t e f o r a l l f e a t u r e s t o D i s a b l e d .
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e f e a t u r e s t a t e 0” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS BIG TIMEOUT} , l i n e , s e n d ] ) ,

%% A c t i v a t e a l l RabCombination f e a t u r e s
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e=r a b c o m b i n a t i o n f e a t u r e s t a t e 1 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS BIG TIMEOUT} , l i n e , s e n d ] ) ,
%% A c t i v a t e a d d i t i o n a l l i c e n c e s
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e=H s d p a M o b i l i t y P h a s e f e a t u r e s t a t e 1 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS BIG TIMEOUT} , l i n e , s e n d ] ) ,

%% Time i n s a f t e r which a c o n n e c t i o n w i t h low t h r o u g h p u t i s downswitched


%% from HS−DSCH t o CELL FACH .
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t channelswitching hsdschInactivityTimer 3” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% Time i n 0 . 1 s a f t e r which a CPC a c t i v a t e d c o n n e c t i o n w i t h low


%% t h r o u g h p u t i s downswitched from CELL DCH t o CELL FACH . T h i s p a r a m e t e r
%% i s u s e d i n s t e a d o f h s d s c h I n a c t i v i t y T i m e r f o r CPC a c t i v a t e d
%% c o n n e c t i o n s .
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t channelswitching hsdschInactivityTimerCpc 30” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% Time i n 0 . 1 s a f t e r which an i n a c t i v e RB i n a RAB c o m b i n a t i o n


%% c o n t a i n i n g PS I n t e r a c t i v e i s r e l e a s e d .
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t channelswitching i n a c t i v i t y T i m e M u l t i P s I n t e r a c t i v e 30” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% Time i n s a f t e r which an i n a c t i v e c o n n e c t i o n i n CELL FACH s t a t e i s


%% downswitched t o URA PCH s t a t e .
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t channelswitching inacti vityT imer 3” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% Lock HSDPA t o c r e a t e R99 c e l l s


{ok , } = cpp mos : e x p e c t ( MosPid , ” b l u t r a n c e l l=iub −3−1, Hsdsch ”,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” b l u t r a n c e l l=iub −3−6, Hsdsch ”,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ” b l u t r a n c e l l=iub −4−3, Hsdsch ”,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Add t h e below s e t t i n g s s o t h a t t h e o u t p u t f i l e s match t h e b a s e l i n e


%% f i l e s
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t handover f d d I f h o S u p p 1 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f u n c t i o n hsCellChangeAllowed 1” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% A c t i v a t e Dch and Hspa IFLS f e a t u r e s


{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e=DchLoadSharing f e a t u r e s t a t e 1 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e=HspaLoadSharing f e a t u r e s t a t e 1 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid ,
” s e t r n c f e a t u r e=I f I r a t M o b i l i t y H s d p a E u l f e a t u r e s t a t e 1 ” ,
[ ” T o t a l ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% S e t handover and r n c f u n c t i o n p a r a m e t e r s

35
{ok , } = cpp mos : e x p e c t ( MosPid ,
” l s e t RncFunction =1 , Handover=1 i f l s H y s t 2 0 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
{ok , } = cpp mos : e x p e c t ( MosPid ,
” l s e t RncFunction=1$ h s O n l y B e s t C e l l 0 ” ,
[ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

%% Remove u t r a n r e l a t i o n from Iub −3 and IUb−4 t o o t h e r Iub ’ s


ok = cpp mos : s e n d ( MosPid ,
” d e l U t r a n C e l l=Iub −3 −[1 −6] , u t r a n r e l a t i o n=I n t r a −Iub −6”) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ”y ” , [ ”MOs d e l e t e d ” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
ok = cpp mos : s e n d ( MosPid ,
” d e l U t r a n C e l l=Iub −3 −[1 −6] , u t r a n r e l a t i o n=I n t e r −Iub −6”) ,
{ok , } = cpp mos : e x p e c t ( MosPid , ”y ” , [ ”MOs d e l e t e d ” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

% %% Coverage r e l a t i o n s c a n n o t be d e f i n e u n t i l TR HO40784
% %% ha s been f i x e d i n 3 gsim .
%
% %% HS s e l e c t i o n c o v e r a g e r e l a t i o n s
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −4−3, c o v e r a g e r e l a t i o n=Iub −4−3 I u b −3 −5”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −3−5”,
% [ ” Proxy ID = ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −3−6, c o v e r a g e r e l a t i o n=Iub −3−6 I u b −3 −3”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −3−3”,
% [ ” Proxy ID = ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −4−3 I u b −3−5 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =0 , h s C e l l S e l e c t i o n =1 , h s L o a d S h a r i n g =0” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −3−6 I u b −3−3 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =0 , h s C e l l S e l e c t i o n =1 , h s L o a d S h a r i n g =0” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% %% HS l o a d s h a r i n g c o v e r a g e r e l a t i o n s
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −3−4, c o v e r a g e r e l a t i o n=Iub −3−4 I u b −4 −1”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −4−1”, [ ” Proxy ID = ” ] ,
% [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −3−4, c o v e r a g e r e l a t i o n=Iub −3−4 I u b −3 −2”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −3−2”, [ ” Proxy ID = ” ] ,
% [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −3−4 I u b −4−1 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =0 , h s C e l l S e l e c t i o n =0 , h s L o a d S h a r i n g =1” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −3−4 I u b −3−2 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =0 , h s C e l l S e l e c t i o n =0 , h s L o a d S h a r i n g =1” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−4 h s I f l s M a r g i n U s e r s 30” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−4 h s I f l s T h r e s h U s e r s 1” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−4 i f l s M o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,

36
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−2 h s I f l s M a r g i n U s e r s 20” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−2 h s I f l s T h r e s h U s e r s 5” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−2 i f l s M o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−1 h s I f l s M a r g i n U s e r s 20” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−1 h s I f l s T h r e s h U s e r s 5” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−1 i f l s M o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% %% DCH l o a d s h a r i n g c o v e r a g e r e l a t i o n s
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −4−2, c o v e r a g e r e l a t i o n=Iub −4−2 I u b −4 −4”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −4−4”,
% [ ” Proxy ID = ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% ok = cpp mos : s e n d ( MosPid ,
% ” c r u t r a n c e l l=Iub −4−2, c o v e r a g e r e l a t i o n=Iub −4−2 I u b −3 −6”) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” RncFunction =1 , U t r a n C e l l=Iub −3−6”,
% [ ” Proxy ID = ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −4−2 I u b −4−4 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =1 , h s C e l l S e l e c t i o n =0 , h s L o a d S h a r i n g =0” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t c o v e r a g e r e l a t i o n=Iub −4−2 I u b −3−6 r e l a t i o n C a p a b i l i t y ”
% ” d c h L o a d S h a r i n g =1 , h s C e l l S e l e c t i o n =0 , h s L o a d S h a r i n g =0” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−2 d c h I f l s M a r g i n C o d e 90” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−2 d c h I f l s M a r g i n P o w e r 90” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−2 d c h I f l s T h r e s h C o d e 1” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−2 d c h I f l s T h r e s h P o w e r 1” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−2 i f l s M o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−4 d c h I f l s M a r g i n C o d e 60” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−4 d c h I f l s M a r g i n P o w e r 60” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−4 d c h I f l s T h r e s h C o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−4 d c h I f l s T h r e s h P o w e r 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −4−4 i f l s M o d e 2” ,

37
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , s e n d ] ) ,
%
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−6 d c h I f l s M a r g i n C o d e 50” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−6 d c h I f l s M a r g i n P o w e r 50” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−6 d c h I f l s T h r e s h C o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−6 d c h I f l s T h r e s h P o w e r 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,
% {ok , } = cpp mos : e x p e c t ( MosPid ,
% ” s e t U t r a n C e l l=Iub −3−6 i f l s M o d e 2” ,
% [ ” 1 MOs s e t ” ] , [ { t i m e o u t , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%%===========================================
%% Save undo f i l e
%%===========================================
u e h h e l p e r : c l o s e t c i n i t u n d o f i l e ( C o n f i g , ?MODULE) ,

%% Setup 3GSim C o n f i g u r a t i o n

T r i g g e r s = g e t c o n f ( tb , C o n f i g ) ,
TriggersN =
[ string : join ( l i s t s : duplicate (4 , l i s t s : nth ( 1 , T r i g g e r s ) ) , ” , ” ) ,
string : join ( l i s t s : duplicate (5 , l i s t s : nth ( 2 , T r i g g e r s ) ) , ” , ” ) ,
string : join ( l i s t s : duplicate (7 , l i s t s : nth ( 3 , T r i g g e r s ) ) , ” , ” ) ] ,

%% D e f i n e any s p e c i f i c T r a f f i c B e h a v i o u r s
%% T r a f f i c B e h a v i o u r ” d c h t o f a c h t o u r a ”
%% Ue 000001
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb i n t 6 4 2 0 s p s i n t f a c h u r a f a c h ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb p s i n t f a c h u r a f a c h − w a i t b e f o r e s t a r t 2000”
” − t r i g g e r s ”++ l i s t s : nth ( 1 , T r i g g e r s N)++
” −r a b s t a t e i n t 6 4 6 4 , cch , i n t u r a u r a , c c h ”
” −u l p a c k e t r a t e 5 0 , 0 , 0 , 2 0 −d l p a c k e t r a t e 5 0 , 0 , 0 , 2 0 ”
” − v a l i d r a b s t a t e s ∗ , cch , i n t u r a u r a , c c h −mm −,−,−,−”
” −sm a c t i v a t e 1 , − , − , −” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% 3 xPsIntEUL HS
%% Ue 000002
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb e u l h s 2 0 s 3 xPsIntEUL HS ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb 3 xPsIntEUL HS −mm −,−,−,−,− − t r i g g e r s ”
” ”++ l i s t s : nth ( 2 , T r i g g e r s N )++” − w a i t b e f o r e s t a r t 2000”
” −r a b s t a t e i n t e u l h s , 2 x i n t e u l h s , 3 x i n t e u l h s , ”
”2 x i n t e u l h s , i n t e u l h s ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb 3 xPsIntEUL HS − v a l i d r a b s t a t e s ∗ , ∗ , ∗ , ∗ , ∗ ”
” −sm a c t i v a t e 1 , a c t i v a t e 2 , a c t i v a t e 3 , ”
” d e a c t i v a t e 2 , d e a c t i v a t e 3 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb 3 xPsIntEUL HS − u l r l c s d u s i z e 5 0 , 7 0 , 5 0 , 7 0 , 5 0 ”
” −u l p a c k e t r a t e 5 0 , 5 0 , 5 0 , 5 0 , 5 0 ”
” −d l r l c s d u s i z e 100 ,100 ,100 ,100 ,100”
” − d l p a c k e t r a t e 7 0 , 5 0 , 7 0 , 5 0 , 7 0 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb 3 xPsIntEUL HS − u l r l c s d u s i z e 2 0 , 5 0 , 7 0 , 0 , 0 ”
” −u l p a c k e t r a t e 2 0 , 5 0 , 2 0 , 0 , 0 ”
” −d l r l c s d u s i z e 2 0 ,100 ,100 ,0 ,0”
” − d l p a c k e t r a t e 2 0 , 2 5 , 1 7 , 0 , 0 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

38
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb 3 xPsIntEUL HS − u l r l c s d u s i z e 3 0 , 0 , 1 0 0 , 8 0 , 0 ”
” −u l p a c k e t r a t e 3 0 , 0 , 5 0 , 5 0 , 0 ”
” −d l r l c s d u s i z e 3 0 ,0 ,100 ,70 ,0”
” − d l p a c k e t r a t e 3 0 , 0 , 5 0 , 1 7 , 0 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% T r a f f i c B e h a v i o u r ” s p e e c h + P s I n t ”
%% Ue 000003
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb i n t 6 4 2 0 s s p i n t ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb s p i n t − w a i t b e f o r e s t a r t 2000”
” − t r i g g e r s ”++ l i s t s : nth ( 3 , T r i g g e r s N)++
” −r a b s t a t e i n t e u l h s , s p e e c h 1 2 2 i n t e u l h s , ”
” speech 12 2 int 0 0 , speech 12 2 2xint eul hs ,”
” speech 12 2 int eul hs , speech 12 2 , s p e e c h 1 2 2 i n t e u l h s ”
” − v a l i d r a b s t a t e s ∗ , ∗ , ∗ , ∗ , ∗ , ∗ , ∗ −mm −,−,−,−,−,−,−”
” −sm a c t i v a t e 1 , − , − , a c t i v a t e 2 , d e a c t i v a t e 1 , ”
” d e a c t i v a t e 2 , a c t i v a t e 1 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb s p i n t − u l p a c k e t r a t e 5 0 , 7 0 , 0 , 6 0 , 0 , 0 , 6 0 ”
” −u l r l c s d u s i z e 100 ,80 ,0 ,100 ,0 ,0 ,80”
” −d l p a c k e t r a t e 5 0 , 5 0 , 0 , 5 0 , 0 , 0 , 5 0 ”
” − d l r l c s d u s i z e 1 0 0 , 8 0 , 0 , 1 0 0 , 0 , 0 , 8 0 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb s p i n t − u l p a c k e t r a t e 2 0 , 0 , 0 , 6 0 , 7 0 , 0 , 0 ”
” −u l r l c s d u s i z e 2 0 ,0 ,0 ,50 ,70 ,0 ,0”
” −d l p a c k e t r a t e 2 0 , 0 , 0 , 5 0 , 7 0 , 0 , 0 ”
” − d l r l c s d u s i z e 2 0 , 0 , 0 , 5 0 , 7 0 , 0 , 0 ” , [ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% M o b i l i t y i n t e r v a l s
I n t e r v a l s = g e t c o n f (mb, C o n f i g ) ,

%% Copy random c e l l s m o b i l i t y b e h a v i o r and r e d u c e l e g change i n t e r v a l


%% Ue 000001
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb r a n d o m c e l l s r a n d o m c e l l s 3 s ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb r a n d o m c e l l s 3 s − l e g c h a n g e i n t e r v a l ”
” ”++ l i s t s : nth ( 1 , I n t e r v a l s )++
” − f a c h c e l l r e s e l e c t i o n i n t e r v a l 100000”++
” −u r a c e l l r e s e l e c t i o n i n t e r v a l 100000” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% Copy random c e l l s m o b i l i t y b e h a v i o r and r e d u c e l e g change i n t e r v a l


%% Ue 000002
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb r a n d o m c e l l s r a n d o m c e l l s 4 s ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb r a n d o m c e l l s 4 s − l e g c h a n g e i n t e r v a l ”
” ”++ l i s t s : nth ( 2 , I n t e r v a l s ) ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% Copy random c e l l s m o b i l i t y b e h a v i o r and r e d u c e l e g change i n t e r v a l


%% Ue 000003
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cb r a n d o m c e l l s r a n d o m c e l l s 5 s ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim mb r a n d o m c e l l s 5 s − l e g c h a n g e i n t e r v a l ”

39
” ”++ l i s t s : nth ( 3 , I n t e r v a l s ) ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , send ] ) ,

%% D e f i n e i m s i 000001 − 000010 w i t h d e f a u l t HLR s u b s c r i b e r d a t a p r o f i l e


r c c t g s : d e f i n e h l r s u b s ( TgsPid , ” 0 0 0 0 0 1 ” , ” 1 0 ” ) .

%%%===========================================================================
%%
%% −>
%% ok | e x i t ( ) | { s k i p , Reason } | {comment , Comment} |
%% { s a v e c o n f i g , C o n f i g 1 } | { s k i p a n d s a v e , Reason , C o n f i g 1 }
%%
%% where
%%
%% ConfigX = [ t u p l e ( ) ]
%% Reason = term ( )
%% Comment = term ( )
%%
%% @doc
%% <pre>
%% T h i s i s an i n i t end t e s t c a s e f o r IFLS f e a t u r e .
%% I t must be e x e c u t e d a t t h e end o f
%% t h e t e s t s u i t e t o r e s t o r e a l l c h a n g e s . The f o l l o w i n g i s done :
%%
%% − MoShell undo f i l e i s run t o r e s t o r e MO c h a n g e s
%% − 3Gsim d e f i n i t i o n s a r e d e l e t e d .
%% </pre>
%% @end
%%%===========================================================================
t c i n i t e n d ( C o n f i g ) −>

r c c t g s : cleanup 3gsim ( Config ) ,

%% Undo MO s e t t i n g s from t c i n i t command


u e h h e l p e r : r u n t c i n i t u n d o f i l e ( C o n f i g , ?MODULE) .

%%%===========================================================================
%% @spec t c r o b ( C o n f i g 0 )
%%%===========================================================================
t c r o b ( C o n f i g ) −>

%% UEs
{UEs , SCs , , , Delays } = g e t c o n f ( Config ) ,

%% Read c o n f i g p a r a m e t e r s
TgsPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC TGS PID , C o n f i g ) ,
T e s t C a se = r c c s u p p o r t : g e t h a n d l e ( ?RCC TESTCASE, C o n f i g ) ,
RncPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC RNC PID , C o n f i g ) ,
ModuleBoards = r c c s u p p o r t : g e t b o a r d s ( module , C o n f i g ) ,

%% Setup 3GSim C o n f i g u r a t i o n

%% S l e e p 1 s

%% C r e a t e UE [ s c = s t a r t c e l l , c = c e l l t o s t a r t i n ,
%% 3 gsim cu=h e l p , bn=b#=den man r i n g e r t i l l ]
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 1 , UEs)++
” −s c ”++ l i s t s : nth ( 1 , SCs)++” −c ∗”
” −tb p s i n t f a c h u r a f a c h −mb r a n d o m c e l l s 3 s ”
” − c a p a b i l i t i e s e u l − e l a l l −ns ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 2 , UEs)++
” −s c ”++ l i s t s : nth ( 2 , SCs)++” −c ∗”
” −tb 3 xPsIntEUL HS −mb r a n d o m c e l l s 4 s ”
” − c a p a b i l i t i e s e u l − e l a l l −ns ” ,

40
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , send ] ) ,

{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i 000004 −c 1015”
” −tb c s m t − c a p a b i l i t i e s r 9 9 −ns ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 3 , UEs)++
” −s c ”++ l i s t s : nth ( 3 , SCs)++” −c ∗”
” −tb s p i n t −mb r a n d o m c e l l s 5 s − c a p a b i l i t i e s e u l ”
” − e l a l l −ns −bn 0 0 0 0 0 4 ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%%=========================================================
%% S t a r t u e i d t r a c e on UE
%%=========================================================
l i s t s : foreach (
f u n ( Ue ) −>
r c c t h r u n : s t a r t u e i d t r a c e ( RncPid , ModuleBoards , Ue )
end , UEs ) ,

cpp timer : s l e e p ( ct : g e t c o n f i g ( host ) , ct : g e t c o n f i g ( cpp time server ) , 1) ,


{ok , } = c p p t e l n e t : e x p e c t ( TgsPid , ”3 gsim s t a u − i a l l ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%% S l e e p 30 s
cpp timer : s l e e p ( ct : g e t c o n f i g ( host ) , ct : g e t c o n f i g ( cpp time server ) , 30) ,

%% Stop and d e l e t e Ue
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim s t o u − i ”++ l i s t s : nth ( 1 , UEs)++”−”++ l i s t s : nth ( 3 , UEs ) ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?STOU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
r c c t g s : s t o p d e l u e ( TgsPid , ” a l l ” ) ,
r c c s u p p o r t : c h e c k u e c t x t r e l e a s e ( Config , 1 0 ) ,

%% Get m o n i t o r f i l e name
FileName = cpp tm : m o n i t o r f i l e n a m e ( [ { t g s m o n i t o r ,
TestCase ,
Config ,
rcc support : g e t l o g d i r ( Config ) ,
ct : get config ( monitor log parser ) } ] ) ,

%% Purge o l d m o b i l i t y f i l e s
l i s t s : foreach (
f u n ( Ue ) −>
ok = c p p t e l n e t : s e n d ( TgsPid ,
”rm −f / c /3 gsim / m e a s u r e m e n t d a t a / ue”++Ue++”.mob” )
end , UEs ) ,

%% R e s u l t from p a r s i n g l o g f i l e
U e T r i g g e r s = p a r s e 3 g s i m l o g ( FileName , C o n f i g ) ,

%% V e r i f y t r i g g e r s
UeTriggersLength = p l i s t l e n g t h ( UeTriggers ) ,
UeTriggersLengthUe = p l i s t l e n g t h t r i g ( UeTriggers ) ,
P a t h S h o r t = ” l o g p r i v a t e /”++
a t o m t o l i s t ( p r o p l i s t s : g e t v a l u e ( t e s t c a s e , C o n f i g ))++
”. short . log ” ,
case ( UeTriggersLength ) of
[ ] −> c t : comment ( i o l i b : f w r i t e (
”< f o n t c o l o r =\” g o l d \”>NO TRAFFIC</f o n t ><br >˜n˜p ” ,
[ g e t c o n f ( Config ) ] ) ) ;
−> c t : comment ( i o l i b : f w r i t e (
”˜p<br >˜n<a h r e f =\”˜ s \”> S h o r t l o g </a><br >˜n˜p ” ,
[ UeTrigg ersLengt hUe , PathShort , g e t c o n f ( C o n f i g ) ] ) )
end ,

41
c t : l o g ( y e l l o w b g , ” U e T r i g g e r s ( ˜ p ) : ˜p˜n ” ,
[ UeTriggersLength , UeTriggers ] ) ,

%% Wait b e f o r e s t a r t
GetDelay = f u n ( Ue ) −>
{ l i s t s : nth ( l i s t t o i n t e g e r ( Ue ) , D e l a y s ) ,” −” ,” −”} end ,

%% C r e a t e m o b i l i t y f i l e
CreateMobFile = l i s t s : foreach (
f u n ( { Ue , T r i g g e r s } ) −>
u e h 3 g s i m h e l p e r : t g s c r e a t e m o b i l i t y f i l e ( TgsPid ,
[ GetDelay ( Ue ) | d e l a y 2 b ( T r i g g e r s ) ] , ” ue”++Ue++”.mob” )
end , U e T r i g g e r s ) .

%%%===========================================================================
%% @spec t c r o b v r f ( C o n f i g 0 )
%%%===========================================================================
t c r o b v r f ( C o n f i g ) −>

%% UEs
{UEs , SCs , , , } = g e t c o n f ( Config ) ,

%% Read c o n f i g p a r a m e t e r s
TgsPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC TGS PID , C o n f i g ) ,
T e s t C a se = r c c s u p p o r t : g e t h a n d l e ( ?RCC TESTCASE, C o n f i g ) ,
RncPid = r c c s u p p o r t : g e t h a n d l e ( ? RCC RNC PID , C o n f i g ) ,
ModuleBoards = r c c s u p p o r t : g e t b o a r d s ( module , C o n f i g ) ,

c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 1 , UEs)++
” −c ”++ l i s t s : nth ( 1 , SCs)++” −a a c ∗”
” −tb p s i n t f a c h u r a f a c h −mf ue”++ l i s t s : nth ( 1 , UEs)++”.mob”
” − c a p a b i l i t i e s e u l − e l a l l −ns ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 2 , UEs)++
” −c ”++ l i s t s : nth ( 2 , SCs)++” −a a c ∗”
” −tb 3 xPsIntEUL HS −mf ue”++ l i s t s : nth ( 2 , UEs)++”.mob”
” − c a p a b i l i t i e s e u l − e l a l l −ns ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i 000004 −c 1015”
” −tb c s m t − c a p a b i l i t i e s r 9 9 −ns ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim cu − i ”++ l i s t s : nth ( 3 , UEs)++
” −c ”++ l i s t s : nth ( 3 , SCs)++” −a a c ∗”
” −tb s p i n t −mf ue”++ l i s t s : nth ( 3 , UEs)++”.mob”
” − c a p a b i l i t i e s e u l − e l a l l −ns ”
” −bn 0 0 0 0 0 4 ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?CU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

%%=========================================================
%% S t a r t u e i d t r a c e on UE
%%=========================================================
l i s t s : foreach (
f u n ( Ue ) −>
r c c t h r u n : s t a r t u e i d t r a c e ( RncPid , ModuleBoards , Ue )
end , UEs ) ,

cpp timer : s l e e p ( ct : g e t c o n f i g ( host ) , ct : g e t c o n f i g ( cpp time server ) , 1) ,


{ok , } = c p p t e l n e t : e x p e c t ( TgsPid , ”3 gsim s t a u − i a l l ” ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?RCC MOS TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,

42
%% S l e e p 30 s
cpp timer : s l e e p ( ct : g e t c o n f i g ( host ) , ct : g e t c o n f i g ( cpp time server ) , 30) ,

%% Stop and d e l e t e Ue
{ok , } = c p p t e l n e t : e x p e c t ( TgsPid ,
”3 gsim s t o u − i ”++ l i s t s : nth ( 1 , UEs)++”−”++ l i s t s : nth ( 3 , UEs ) ,
[ ”EXECUTED” ] ,
[ { t i m e o u t , ?STOU TIMEOUT} , { prompts , u n l i m i t e d } , s e n d ] ) ,
r c c t g s : s t o p d e l u e ( TgsPid , ” a l l ” ) ,
r c c s u p p o r t : c h e c k u e c t x t r e l e a s e ( Config , 1 0 ) ,

%% Get m o n i t o r f i l e name
FileName = cpp tm : m o n i t o r f i l e n a m e ( [ { t g s m o n i t o r ,
TestCase ,
Config ,
rcc support : g e t l o g d i r ( Config ) ,
ct : get config ( monitor log parser ) } ] ) ,

%% R e s u l t from p a r s i n g l o g f i l e
U e T r i g g e r s = p a r s e 3 g s i m l o g ( FileName , C o n f i g ) ,

%% V e r i f y e x e c u t e d t r i g g e r s
UeTriggersLength = p l i s t l e n g t h ( UeTriggers ) ,
UeTriggersLengthUe = p l i s t l e n g t h t r i g ( UeTriggers ) ,
P a t h S h o r t = ” l o g p r i v a t e /”++
a t o m t o l i s t ( p r o p l i s t s : g e t v a l u e ( t e s t c a s e , C o n f i g ))++
”. short . log ” ,
case ( UeTriggersLength ) of
[ ] −> c t : comment ( i o l i b : f w r i t e (
”< f o n t c o l o r =\” g o l d \”>NO TRAFFIC</f o n t ><br >˜n˜p ” ,
[ g e t c o n f ( Config ) ] ) ) ;
−> c t : comment ( i o l i b : f w r i t e (
”˜p<br >˜n<a h r e f =\”˜ s \”> S h o r t l o g </a><br >˜n˜p ” ,
[ UeTrigg ersLengt hUe , PathShort , g e t c o n f ( C o n f i g ) ] ) )
end ,
c t : l o g ( y e l l o w b g , ” V e r i f i c a t i o n o f ˜n U e T r i g g e r s ( ˜ p ) : ˜p˜n ” ,
[ UeTriggersLength , UeTriggers ] ) .

%%%===========================================================================
%% @spec t c r o b p o s t c h e c k t g s i m ( C o n f i g 0 )
%%%===========================================================================
t c r o b p o s t c h e c k t g s i m ( C o n f i g ) −>
Expected = ” ” ,
r c c p c : t g s e x c e p t i o n a n d e r r o r c h e c k ( C o n f i g , Expected ) .

%%%===========================================================================
%% @spec t c r o b v r f p o s t c h e c k t g s i m ( C o n f i g 0 )
%%%===========================================================================
t c r o b v r f p o s t c h e c k t g s i m ( C o n f i g ) −>
Expected = ” ” ,
r c c p c : t g s e x c e p t i o n a n d e r r o r c h e c k ( C o n f i g , Expected ) .

%%%===========================================================================
%% @spec t c r o b p o s t c h e c k e x c e r r ( C o n f i g 0 )
%%%===========================================================================
t c r o b p o s t c h e c k e x c e r r ( C o n f i g ) −>
Expected =”” ,
r c c p c : e x c e p t i o n a n d e r r o r c h e c k ( C o n f i g , Expected ) .

%%%===========================================================================
%% @spec t c r o b v r f p o s t c h e c k e x c e r r ( C o n f i g 0 )
%%%===========================================================================
t c r o b v r f p o s t c h e c k e x c e r r ( C o n f i g ) −>
Expected =”” ,
r c c p c : e x c e p t i o n a n d e r r o r c h e c k ( C o n f i g , Expected ) .

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
%%% #6. TEST SUITE SPECIFIC FUNCTIONS

43
%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%% P a r s e 3 gsim l o g f i l e t o m o b i l i t y file format


p a r s e 3 g s i m l o g ( F i l e , C o n f i g ) −>

%% Read f i l e
{ok , Data } = f i l e : r e a d f i l e ( F i l e ) ,

%% P i c k e v e n t s
P a t t e r n = ” \ \ [ ( . { 2 3 } ) \ \ ] . + ?UE: ( \ \ d++).+? e v e n t =(\\d\\w) ”
” ( ? : , [ ˆ , = ] + ? = ( \ \ d + + ) ) ? ( ? : , [ ˆ , = ] + ? = ( \ \ d ++))?” ,

c a s e r e : run ( Data , P a t t e r n , [ { capture , all but first , l i s t } , global ]) of


{match , M} −>
Matches = M;
nomatch −>
Matches = [ ]
end ,

%% E x i t i f no match
c a s e l e n g t h ( Matches ) o f
0 −> %c t : comment(”< f o n t c o l o r =\” g o l d \”>NO TRAFFIC</f o n t >”) ,
c t : p a l ( e r r o r , ”NO TRAFFIC ” ) ;
−> ok
end ,

%% S o r t o u t ( d i s t i n c t ) UEs
AllUEs = [ Ue | | [ | [ Ue | ] ] <− Matches ] ,
UEs = l i s t s : u s o r t ( AllUEs ) ,

%% P r i n t l o g l i n k s
p r i n t l o g l i n k s ( F i l e , C o n f i g , Data ) ,

%% V e r i f y c a p t u r e s
c t : l o g ( y e l l o w b g , ” Matches ( ˜ p ) : ˜p˜n ” , [ l e n g t h ( Matches ) , Matches ] ) ,

%% Fix f o r m a t f o r e v e n t s
U e A c t i o n s = l i s t s : map(
f u n ( [ A, B , C, D, E ] ) −>
[ A, B , C,D++”−”++E ] ; % 1C
( [ A, B , C ] ) −>
[ A, B , C++” e c n o ” , ” − ” ] ; % 2D & 2F e v e n t s
(A) −>
A
end , Matches ) ,

%% Match e l e m e n t p o s i t i o n s & c o n v e r t t o u n i x timestamp


UeEvents = [ [ U, l o g t i m e t o u n i x t i m e (H) , T,M] | | [ H, U,M, T ] <− U e A c t i o n s ] ,

%% Reformat t o t u p l e and c a l c u l a t e t i m e d i f f
U e T r i g g e r s = l i s t s : map(
f u n ( Ue ) −>
Even ts = [ T | | [ H| T ] <− UeEvents , H==Ue ] ,
{Ue , t i m e d i f f t u p l e ( Ev ents ) }
end , UEs ) .

%% C a l c u l a t e t i m e d i f f e r e n c e o f t u p l e e l e m e n t s i n l i s t ( i n ms )
t i m e d i f f t u p l e ( [ [ X1 , V1 ,W1] | [ [ X2 , , ] | ]=Rem ] ) −>
[ { i n t e g e r t o l i s t ( round ( ( X2−X1 ) ∗ 1 0 0 0 ) ) , V1 ,W1} | t i m e d i f f t u p l e (Rem ) ] ;
t i m e d i f f t u p l e ( [ [ , V,W] ] ) −>
[ { i n t e g e r t o l i s t ( 1 0 0 0 0 0 ) ,V,W} ] ;
t i m e d i f f t u p l e ( [ ] ) −>
[].

%% C o n v e r t s l o g t i m e t o u n i x t i m e : 2011−02−01 0 3 : 4 8 : 0 0 . 7 4 8 −> 4 3 4 5 8 6 4 5 4 2 3 4 . 7 4 8
l o g t i m e t o u n i x t i m e ( Logtime ) −>
P a t t e r n = ” ( \ \ d {4}) −(\\ d {2}) −(\\ d { 2 } ) ”
”(\\d { 2 } ) : ( \ \ d { 2 } ) : ( \ \ d {2})\\.(\\ d {3})” ,
{match , Matches } = r e : run ( Logtime , P a t t e r n ,
[ { capture , a l l b u t f i r s t , l i s t } ] ) ,
M a t c h e s I n t = [ l i s t t o i n t e g e r (M) | | M <− Matches ] ,
[ Year , Month , Day , Hour , Min , Sec , Msec ] = M a t c h e sI n t ,

44
calendar : datetime to gregorian seconds (
{{ Year , Month , Day } , { Hour , Min , S e c } } ) − 6 2 1 6 7 2 1 9 2 0 0 + Msec / 1 0 0 0 .

%% P r i n t l o g l i n k s & g e n e r a t e s h o r t l o g
p r i n t l o g l i n k s ( F i l e , C o n f i g , Data ) −>
c t : l o g ( b l u e b g , ” t g s m o n i t o r l o g l i n k ˜n <a h r e f =\”˜ s \”>˜s </a>˜n ” ,
[ ” l o g p r i v a t e /”++ f i l e n a m e : basename ( F i l e ) , F i l e ] ) ,

P a t t e r n = ” . + ( M o b i l i t y Ind | t a r g e t RAB s t a t e | e v e n t =| f r o z e n ) . + ” ,
c a s e r e : run ( Data , P a t t e r n , [ { c a p t u r e , f i r s t , l i s t } , g l o b a l ] ) o f
{match , L i n e s } −>
DataShort = r e f o r m a t l o g l i n e s ( L i n e s ) ,
Mat = l e n g t h ( L i n e s ) ;
nomatch −>
DataShort = [ ] ,
Mat = 0
end ,

F i l e S h o r t = a t o m t o l i s t ( p r o p l i s t s : g e t v a l u e ( t e s t c a s e , C o n f i g ))++
”. short . log ” ,
DirShort = p r o p l i s t s : g e t v a l u e ( p r i v d i r , Config ) ,
ct : log ( blue bg ,
” t g s m o n i t o r SHORT ( ˜ p ) l o g l i n k ˜n <a h r e f =\”˜ s \”>˜s </a>˜n ” ,
[ Mat , ” l o g p r i v a t e /”++ F i l e S h o r t , D i r S h o r t++F i l e S h o r t ] ) ,

f i l e : w r i t e f i l e ( D i r S h o r t++F i l e S h o r t ,
i o l i b : f w r i t e ( ” ˜w˜n˜p˜n ” ,
[ s t r 2 i n t ( g e t c o n f ( C o n f i g ) ) , DataShort ] ) ) .

%% Reformat l o g l i n e s
r e f o r m a t l o g l i n e s ( L i n e s ) −>
P a t t e r n = ” \ \ [ ( . { 2 3 } ) \ \ ] . +UE: ( \ \ d { 6 } ) : ( . + ) . ” ,
L i n e s R e f o r m a t = l i s t s : map(
f u n ( L i n e ) −>
{match , Cap} = r e : run ( Line , P a t t e r n ,
[ { capture , a l l b u t f i r s t , l i s t }]) ,
Cap
end , L i n e s ) ,

%% S o r t o u t ( d i s t i n c t ) UEs
AllUEs = [ Ue | | [ | [ Ue | ] ] <− L i n e s R e f o r m a t ] ,
UEs = l i s t s : u s o r t ( AllUEs ) ,

%% S o r t by UE & Show r e l a t i v e t i m e
l i s t s : map(
f u n ( Ue ) −>
L i s t = [ [ l o g t i m e t o u n i x t i m e (T ) | A ] | | [ T | [ U|A ] ] <−
L i n e s R e f o r m a t , U==Ue ] ,
{Ue , r e l t i m e ( L i s t ) }
end , UEs ) .

%% C a l c u l a t e t i m e d i f f e r e n c e r e l a t i v e t o t h e f i r s t l i s t e l e m e n t
r e l t i m e ( [ [ T0 |R ] | Rem ] ) −>
[ s t r i n g : j o i n ( [ ” 0 0 0 . 0 0 0 ” |R ] , ” ” ) | r e l t i m e (Rem, T0 ) ] ;
r e l t i m e ( [ ] ) −>
[].
r e l t i m e ( [ [ T1 |R ] | Rem ] , T0 ) −>
Tf = ”000000”++ i n t e g e r t o l i s t ( round ( 1 0 0 0 ∗ ( T1−T0 ) ) ) ,
T = s t r i n g : s u b s t r ( Tf , l e n g t h ( Tf ) −5 , 3)++”.”++
s t r i n g : s u b s t r ( Tf , l e n g t h ( Tf ) −2) ,
[ s t r i n g : j o i n ( [ T |R ] , ” ” ) | r e l t i m e (Rem, T0 ) ] ;
rel time ([] , ) −>
[].

%% Add 50 ms t o 2B e v e n t s & s u b t r a c t 50 ms from t h e f o l l o w i n g e v e n t s


d e l a y 2 b ( [ { A1 , B1 , ” 2D”=C1} | [ { A2 , B2 , C2} | Rem ] ] ) −>
A1i = i n t e g e r t o l i s t ( l i s t t o i n t e g e r ( A1) + 5 0 ) ,
A2i = i n t e g e r t o l i s t ( l i s t t o i n t e g e r ( A2) −50) ,
[ { A1i , B1 , C1} | [ { A2i , B2 , C2} | d e l a y 2 b (Rem ) ] ] ;
d e l a y 2 b ( [ T | Rem ] ) −>

45
[ T | d e l a y 2 b (Rem ) ] ;
d e l a y 2 b ( [ ] ) −>
[].

%% Get l e n g t h o f t r i g g e r s p r o p l i s t
p l i s t l e n g t h t r i g ( P l i s t ) −>
l i s t s : map(
f u n ( {K, V} ) −>
{K, l e n g t h (V) }
end ,
Plist ).

%% Get l e n g t h o f p r o p l i s t
p l i s t l e n g t h ( [ { , V} |Rem ] ) −>
[ l e n g t h (V) | p l i s t l e n g t h (Rem ) ] ;
p l i s t l e n g t h ( [ ] ) −>
[].

%% G e n e r a t e random c o n f i g
r a n d o m c o n f ( ) −>
UEs = [ ” 0 0 0 0 0 1 ” , ” 0 0 0 0 0 2 ” , ” 0 0 0 0 0 3 ” ] ,
SCs = i n t 2 s t r ( rand ( 1 0 1 3 , 1 0 2 4 , 3 ) ) , %1013−1024 %13 ,14 ,15 %14 ,23 ,24
TBs = [ ” 4 0 0 0 ” , ” 3 0 0 0 ” , ” 2 0 0 0 ” ] ,
MBs = [ ” 3 0 0 0 ” , ” 4 0 0 0 ” , ” 5 0 0 0 ” ] , %3 ,4 ,5 %11 ,7 ,9
Delays = [”2250” ,”3240” ,”4260”] ,
{UEs , SCs , TBs , MBs, D e l a y s } .

%% G e n e r a t e a l i s t o f random i n t e g e r s
rand ( L , H, N) −>
random : s e e d ( now ( ) ) ,
l i s t s : map(
f u n ( ) −>
L+random : u n i f o r m (H−L )
end , l i s t s : s e q ( 1 ,N ) ) .

%% C o n v e r t s a l i s t o f i n t e g e r s t o s t r i n g s
i n t 2 s t r ( L i s t ) −>
l i s t s : map(
f u n ( Elem ) −>
i n t e g e r t o l i s t ( Elem )
end ,
List ).

%% C o n v e r t s a l i s t o f s t r i n g s t o i n t e g e r s
s t r 2 i n t ( [ Elem | ]= I n t ) when i s i n t e g e r ( Elem ) −>
l i s t t o i n t e g e r ( Int ) ;
s t r 2 i n t ( [ Elem | Rem ] ) when i s l i s t ( Elem ) −>
[ s t r 2 i n t ( Elem ) | s t r 2 i n t (Rem ) ] ;
s t r 2 i n t ( Tuple ) when i s t u p l e ( Tuple ) −>
s t r 2 i n t ( t u p l e t o l i s t ( Tuple ) ) ;
s t r 2 i n t ( [ ] ) −>
[].

%% Get c o n f i g u r a t i o n p a r a m e t e r s
g e t c o n f ( C o n f i g ) −>
p r o p l i s t s : g e t v a l u e ( conf , Config ) .

g e t c o n f ( Ue , C o n f i g ) when i s i n t e g e r ( Ue ) −>
M = t u p l e t o l i s t ( g e t c o n f ( Config ) ) ,
MT = e d o c l i b : t r a n s p o s e (M) ,
l i s t s : nth ( Ue , MT) ;
g e t c o n f ( Type , C o n f i g ) when i s a t o m ( Type ) −>
Conf = t u p l e t o l i s t ( g e t c o n f ( C o n f i g ) ) ,
Types = [ { ue , 1 } , { s c , 2 } , { tb , 3 } , {mb, 4 } , { d e l a y , 5 } ] ,
TypesIndex = p r o p l i s t s : g e t v a l u e ( Type , Types ) ,
l i s t s : nth ( TypesIndex , Conf ) .

%% End o f t e s t s u i t e
%%%===========================================================================

46