50
RNC Node Level Regression test of Robustness Suite NIKLAS RYGART Masters’ Degree Project Stockholm, Sweden June 2011 XR-EE-KT 2011:003

RNC Node Level Regression test of Robustness Suite

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

RNC Node Level Regression test ofRobustness Suite

NIKLAS RYGART

Masters’ Degree ProjectStockholm, Sweden June 2011

XR-EE-KT 2011:003

Royal Institute of Technology

Master Thesis Report

RNC Node Level Regression testof Robustness Suite

Author:Niklas Rygart

Supervisors:Johan Lundberg

Tobias Oechtering

June 2011

Abstract

The main objective of this master thesis is to reconstruct randomized renderedscenarios 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 emulatesa complete 3G system, consisting of the RNC (Radio Network Controller), CN(Core Network), RBS (Radio Base Station), UE (User Equipment), where thethree 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 thequest of reconstructing the randomized rendered scenario. One of the majorproblems is that 3Gsim generates incorrect mobility events when run with ran-dom mobility. Another problem is that the time between the executing eventare very tight, which requires an unreasonable high precision of the timing inthe 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 itselfto prevent unacceptable timings in the random mobility.

1

Contents

1 Introduction 51.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 System overview 72.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 RNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 RAN interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4 WCDMA RAN basic features . . . . . . . . . . . . . . . . . . . . 92.5 3Gsim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.6 Erlang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.7 Common test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Model 123.1 Test suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Traffic behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.3 Mobility behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.5 Mobility file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.6 Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.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 NetworkHandler) which manages the radio network and creates the transport channelsin between the RNCs and the CN.

The user plane consists of the CCS, DSC and PDR subsystems. CCS controlsthe Common Channel and DCS the Dedicated Channels. The PDR (PacketData 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 systemsthat 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 interms of variety of bit rates and bandwidths are also crucial features of theWCDMA (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 theWCDMA RAN (Radio Access Network). To enable collaboration in betweenthe two generations of mobile telecommunications, backward compatibility is akey 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 updatesalso includes new features. To ensure the new versions does not have negativeimpact on performance or existing features, regression testing comes in handy.

The exception cases in each test scenario that can be evaluated exist in suchamount 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 involvesalternating sequences of calling, data sessions and idling, mobility in the RANnetwork and simulated interruptions such as operation and maintenance.

Regardless of what fault that is triggered, it must be possible to reconstruct thescenario 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 testframework. Erlang OTP comprises is a development environment for buildingdistributed real-time high availability systems. The actual testing is performedwith Common test, which is a framework for automated testing of arbitrarytarget nodes.

1.2 Scope

• Learn how to write and execute RNC node level test cases in the Erlangtest framework

• Design a random test scenario using three UEs

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

• Find out how to be able to rerun the exact same sequence of actions inorder 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 mobilesubscriber related inquiries, such as balances for prepaid cards and routing ofthe 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 containsinformation 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] Thefollowing 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 orsystem (e g 3G to 2G).

• Control the RAB (Radio Access Bearer) state, which ensures adequatepresent mode of the UEs. For example if the UE initiates a call, theSpeech 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 threedifferent 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 Muinterfaces, 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 theOSS-RC (Operations Support System - Radio & Core). The OSS-RC collectsdata 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 theRXI (Radio access network aggregator), which is a type of multiplexer betweenthe RNC and RBS that handles different transport solutions.

The internal interfaces in the RAN for traffic and control signaling is the Iur andIub. 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 thecommunication between the RNC and the RBS. Both these internal interfacescan be used either with the ATM (Asynchronous Transfer Mode) technology orby 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 othermanages 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 ispossible 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 includesincoming 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 heavyusage a dedicated channel is assigned, while a switch to a common channel isperformed upon dropped usage. This feature that optimizes the available re-sources is called channel switching. In addition the switch, to a higher or lowerbit rate channel, could take place depending on the coverage and throughput aswell.

The ciphering mode control is a feature handled by the CN to ensure securedata transfers between the RNC and the UE. It also coordinates the cipheringkeys between the CNs. The currently used Kasumi algorithm (128 bits) wasconventioned already in 3GPP ’99 (3rd Generation Partnership Project).

Upon overload the congestion control feature is utilized. The feature can forinstance order a channel switch to release some resources or in worst case denynew 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 thebandwidth is shared it is of great importance that all UE keep an appropriatepower level on basis of the corresponding position. For example less power isrequired to maintain the desired SNR (Signal to Noise Ratio) for UEs close tothe RBS, compared to UEs at the cell border.

A positioning service is available through the Iu interface. It is based on theSAI (Service Area Identifier). [5]

2.5 3Gsim

Figure 5: Testframework overview

3Gsim is a very complex environment offering high-level commands controllingmany simulated objects in one command. It is built on CPP (Cello PacketPlatform) and runs on a number of GPB (General purpose Processor Board)and SPB (Special Purpose Processor Board), see Figure 5. The commands caneither be entered strait into the CLI (Command Line Interface) or executedfrom a command file. In this thesis the commands are executed through atelnet connection which is set up via Erlang. In other words the test frameworkis used to manoeuvre 3Gsim (and the CPPemu). The complete 3Gsim manualis available in [10].

2.6 Erlang

Erlang is a functional concurrent programming language, which the test casesare 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 usedwithin banking, computer telephony and instant messaging. A four day coursewas 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 specificplatform which is called Erlang OTP with a set of Erlang libraries and designprinciples that for example enables debugging and inter-language applicationinterface. 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 usedfor white-box testing in OTP applications and Erlang programs. It provides thepossibility to run test suites automatically on local and remote targets in a largescale. The results are presented in a HTML (Hyper Text Markup Language)format. Common test has good prerequisites for regression testing, which areutilized 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 UEshave different traffic and mobility behaviors. One of them calls the fourthpassive 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. Thecells 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, definesthe traffic behaviors and the mobility behaviors.

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

The third, tc rob vrf (verifying robustness test case) starts three UEs with thecustom 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 rundifferent 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 itslast 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) RegistrationArea) 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 waitbefore randomly change location. The FACH (Forward Link Access Channel)and URA (UTRAN (UMTS Terrestrial Radio Access Network) RegistrationArea) reselection parameters are used in combination with traffic behaviorscontaining 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 setcells. 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 adecision 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 madeby 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, cellis 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 cellIDs, 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 theUE, 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 onwhich mobility event received from the UE, the RNC makes a decision whetherchange of frequency or cell is appropriate. If a cell does not have support forHSPA (High Speed Packet Access) and the UE requests a change to DCH theRNC 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, threeand four seconds respectively for the traffic behavior. The interval for the mobil-ity behaviors were set to four, three and five seconds. Unfortunately there weresome issues with the concurrent execution of the commands in 3Gsim, whichled to a solution with behaviors containing intervals that did not match themultiples of the other UEs. Later on a checkpoint upgrade was performed andthis did no longer seem to affect the outcome and were consequently changedback 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 commandcaused 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 successfulas 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 theRNC node. This affected the whole test department for a several weeks andcaused problems to run traffic at all. The upgrade was necessary to be ableto make use of the new functions that the test case required. One possibleworkaround to this was to reset the RBS and redefine them again. But thatdid not seem to have the desired effect on the synchronization problems. Lateron another attempt was applied to fix this issue. The approach was to restart3Gsim after changing the SPM (Special Purpose Processor Module) allocationfor 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 isolatedto the Iub frame synchronization triggered by 3Gsim.

In combination with the synchronization problems the license key for the RNCapplication expired, which contributed to some errors that was quite hard totrack, 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 tothe suite tc rob postcheck tgsim and tc rob postcheck exc err. Where the priorshows exceptions in 3Gsim. For example if incorrect RAB states were estab-lished or a mobility event could not be performed. While the latter shows theif there were any exception errors in the RNC. Two of these post checks werealso added to the reconstructing test case.

There was a delay in the start of the random mobility of approximately 4.5seconds compared to the fixed mobility that started immediately. Therefore astart 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 ofthe mobility events once. Sometimes when the emulator was restarted the starttime was drifting which required a reconfiguration of the delays that was reallytime consuming.

16

4 Results

The test case tc rob parsed the output of the 3Gsim log and created a mobilityfile successfully.

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

The hangings were in most cases caused by the mobility event 2b, when thecell 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 thevery same moment (millisecond) as the change of frequency was ordered. Sincethe precision of the execution was not sufficient (below one millisecond), a 50 msdelay was introduced before any 2b events was executed. This was compensatedby subtracting 50 ms from the event after to prevent affection of the remainingevents.

Initially the start cells were set manually. But in order to reduce affection ofthe different capabilities of the cells, a function choosing random start cells foreach 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 testrun. One set of configurations with random start cells and 6900, 9150 and 10250milliseconds start delay of the mobility for the three UEs respectively, gave theresult presented in Table (1). The table shows one test run per line with theamount of executed mobility events in respective test case. The right columntells 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 4400milliseconds start delay of the mobility for the three UEs respectively, gave theresult presented in Table (2).

The FACH and URA reselection intervals in the mobility behavior for the firstUE did not work properly, because reselection of cells in URA and FACH is justpossible with random mobility, and cannot be specified in custom mobility. Sothe reselection interval for URA and FACH were set to 100 000 ms to preventchange of active cell during URA and FACH.

Yet another error was discovered. 3Gsim random mobility generates incorrectevents in combination with Hard Handover. 3Gsim is sending mobility 2d tomake 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 tobe disabled and thus also the inter frequency coverage relations. Table 3 showsthe result of those test runs.

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

17

rob rob vrf rob == rob vrf != 0UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3

3 5 4 2 3 4 14 5 4 0 5 4 1 10 4 4 0 4 4 1 17 5 4 4 3 28 4 4 0 4 4 1 12 5 4 2 5 4 1 1 12 4 4 2 4 4 1 1 11 5 5 0 1 26 5 5 1 3 3

0 5 4 0 2 23 4 4 2 2 23 5 3 1 5 3 1 17 4 5 1 4 3 15 5 4 0 1 4 11 5 5 1 5 5 1 1 15 6 4 2 4 4 13 6 4 1 1 23 4 5 2 4 2 1

6 4 5 6 4 5 1 1 18 4 5 8 4 2 1 10 5 3 0 5 2 12 5 4 2 5 4 1 1 17 6 4 2 1 34 4 4 2 4 4 1 11 4 4 1 4 4 1 1 10 5 4 0 1 4 14 5 4 4 1 3 1

25% 64% 59%

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

18

rob rob vrf rob == rob vrf != 0UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3

4 15 12 2 15 5 19 13 9 11 13 5 110 12 8 10 3 8 1 16 12 9 3 5 57 12 9 8 11 9 16 10 14 10 1 2

3 10 10 2 10 10 1 18 10 9 3 1 56 15 12 10 1 25 12 11 3 12 11 1 19 12 7 8 8 56 13 12 6 10 1 110 11 9 6 8 5

15% 31% 31%

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

rob rob vrf rob == rob vrf != 0UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3

8 12 10 8 12 10 1 1 17 15 9 2 3 59 11 10 8 7 10 17 14 10 2 3 17 13 10 6 1 5

20% 20% 40%

Table 3: Success rate (number of mobility events) for test runs wihout interfrequency 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 testcase led to another test run with tc init end included in each test group to resetthe network. Results are shown in Table 5.

20

rob rob vrf rob == rob vrf != 0UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE3

7 11 12 4 7 57 14 14 4 3 19 12 11 8 3 28 13 13 8 13 2 1 17 10 11 6 5 11 15 10 13 4 10 1 18 13 10 8 5 10 1 18 9 11 8 9 11 1 1 16 15 9 4 7 67 9 14 8 7 26 12 11 2 3 23 14 12 6 14 1 14 12 9 2 5 67 12 10 4 10 10 18 13 10 8 7 5 15 12 7 6 5 53 12 12 2 5 12 1

10 11 8 10 11 8 1 1 110 12 10 10 12 9 1 15 14 10 7 7 88 10 12 8 10 9 1 18 12 7 6 5 53 13 9 2 13 3 110 9 10 10 7 10 1 16 12 13 4 12 1 18 14 10 8 3 10 1 110 11 12 8 11 4 13 13 11 2 13 11 1 18 12 11 6 12 5 16 12 12 4 1 89 16 8 8 8 56 12 12 4 12 2 17 12 10 10 12 1 110 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 != 0UE1 UE2 UE3 UE1 UE2 UE3 UE1 UE2 UE310 14 9 6 13 9 16 13 11 10 13 11 1 18 11 10 8 5 10 1 110 11 12 10 3 2 16 12 11 2 6 510 12 9 10 5 9 1 15 14 10 8 3 28 16 9 8 3 2 18 13 10 8 13 10 1 1 19 15 7 6 10 5

5 12 11 2 8 510 14 10 10 3 5 19 13 10 8 10 10 19 11 7 10 11 3 17 15 12 6 6 58 11 8 3 9 47 13 7 4 13 7 1 15 12 10 2 5 73 13 7 2 3 7 1

30% 20% 40%

Table 5: Success rate (number of mobility events) for test runs with tc init endincluded. (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 thesame scenario, hopefully triggering the same faults, is possible under the rightcircumstances.

One prerequisite is that the initial mobility event will be executed at the sametime for all runs of the tc rob vrf cases. Another is that the random mobilityrenders correct events. Today 3Gsim generates faulty events, which leads tothe infeasibility of the custom mobility to generate the same (faulty) sequenceof events. In other words the few times 3Gsim manages to generate the eventscorrectly 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 eventsat 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 ofless than one ms. For a realistic scenario 100 ms or at most 50 ms of precisioncould be achieved, because the time to establish or change a RAB state slightlyvaries. Sometimes this problem arises with a few milliseconds difference, whichstill makes it very difficult to get exact same sequence. The most frequentlyevents with this behavior is the 1d and 2d events.

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

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

Another thing to take into account is what size of the delay to accept to considerit as a successful one. This can be tricky because in a simulated environmentthere will always be some time difference. A rule of thumb could be to at mostaccept 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 analyzingwhat the source of the fault is needed. One strategy is to modify the timing ofthe random mobility events in order to prevent the executed events to be tootight. Although this will require a new revision of the whole 3G simulator.

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

23

6 Discussion

Further investigation of whether the license based tool QuviQ check [9], that isused for automated testing, could be utilized to run a regression test of the kindperformed 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. Forexample it would be possible to discover passed test cases handled in a nonoptimal way.

Due to the varying success when running test cases with identical setup, thereis 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 suppressthe time difference between the initial event of tc rob and tc rob vrf expertadvice 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 ABDecember 12, 2010

[2] WCDMA RAN 137/1551-HSD 101 02 Uen C Ericsson ABDecember 9, 2010

[3] Erlang Crash Course Peter Andersson, Ericsson ABSeptember, 2006

[4] RNC Introduction Flow LZU00000455 Ericsson ABRev 1A

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

[6] Ericsson WCDMA System Overview 1055469 Ericsson ABJanuary 22, 2008

[7] Erlang OTP reference manual http://demo.erlang.org/erldocApril 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 BNJanuary 25, 2011

[11] WCDMA RAN 2/22105-FGB 101 135 Uen Rev H Ericsson ABApril 21, 2005

26

Test suite

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%%% #0. BASIC INFORMATION%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%%===================================================================%%% Fi l e : ueh robustness SUITE . e r l%%%%%% Desc r ip t i on : Test Su i t e conta in ing randomized robustnes s t e s t c a s e%%% mainly with UEH focus%%%%%%===================================================================

−module ( ueh robustness SUITE ) .

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

%%==========================================%% Test s e r v e r c a l l b a ck s .%% See each func t i on below%%==========================================

−export ( [ a l l /0 , %% mandatorys u i t e /0 , %% opt i ona lgroups /0 , %% opt i ona li n i t p e r s u i t e /1 , %% opt i ona le nd p e r s u i t e /1 , %% opt i ona li n i t p e r g r oup /2 , %% mandatory i f groups are de f inedend per group /2 , %% mandatory i f groups are de f inedi n i t p e r t e s t c a s e /2 , %% opt i ona le nd p e r t e s t c a s e / 2 ] ) . %% opt i ona l

%%==========================================%% Test ca s e s%% Def ines a l l t e s t ca s e s .%% Functions without arguments ( xxx /0) are op t i ona l .%%==========================================

−export ( [ t c r ob /1 ,t c r o b v r f /1 ,pa r s e 3g s im log /2 ,t c i n i t /1 ,t c i n i t e n d /1 ,t c r ob po s t che ck tg s im /1 ,t c r ob v r f p o s t ch e ck t g s im /1 ,t c r ob po s t c h e c k e x c e r r /1 ,t c r o b v r f p o s t c h e c k e x c e r r / 1 ] ) .

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

%%==========================================%% Mandatory inc lude f i l e s%%==========================================

− i n c l u d e l i b (” common test/ inc lude / ct . h r l ” ) .−i n c lude (”/ vobs/ rnc / uteUsers / rcc / r c c suppor t / inc lude / r c c d e f . h r l ” ) .−i n c lude (”/ vobs/ rnc / uteUsers / rcc / r c c suppor t / inc lude / r c c suppor t . h r l ” ) .−i n c lude (”/ vobs/ rnc / uteUsers / rcc / r c c suppor t / inc lude / r c c c o n f i g . h r l ” ) .

%%==========================================%% My inc luded f i l e s%%==========================================

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

28

−de f i n e (RNC DELAY,choose ( ct : g e t c o n f i g ( host ) == ct : g e t c o n f i g ( t g s ho s t ) , 0 , 0 ) ) .

−de f i n e (CU TIMEOUT, 5000) . %t y p i c a l l y 3 s−de f i n e (STOU TIMEOUT, 180000) . %t y p i c a l l y 80−120 s

%% I f us ing r e a l or emu RNC

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

%%%===========================================================================%% @spec a l l ( )%%%% −> GroupsAndTestCases | { skip , Reason}%%%% where%% GroupsAndTestCases = [{ group , GroupName} | TestCase ]%% GroupName = atom ( )%% TestCase = atom ( )%% Reason = term ( )%%%% @doc%% Return a l i s t in which order the t e s t case groups and%% the t e s t ca s e s are to be run .%% Note : i f a t e s t case i s not l i s t e d i t wont be executed .%% @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 ns u i t e ( ) −>

[{ t imetrap , {hours , 5}} ,{userdata , [{ l e v e l , s i t e } ]} ,{ s t y l e sh e e t , ”/home/ en ikryg / pub l i c html / 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 ( Config0 )%%%% −> Config1 | { skip , Reason} | { sk ip and save , Reason , Config1}%%%% where%%%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%%%% @doc%% <pre>%% i n i t p e r s u i t e conta in s i n i t i a l i z a t i o n s%% that are common f o r a l l t e s t ca s e s in the su i t e ,%% and that are only to be performed once . The f o l l ow i ng i s done :%%%% − Open t e l n e t port to RNC and 3Gsim%% − Open MoShell port to RNC%% − Star t time s e r v e r on CPPemu%% − Star t time s e r v e r on CPPemu%% − Build up board l i s t in RNC MoShell with command BP a l l .%% </pre>%% @end%%%===========================================================================i n i t p e r s u i t e ( Config ) −>

%% Enable l ogg ing o f a l l commands to CT logudda log : p r e t t y p r i n t c t ( t rue ) ,

%% Compile r equ i r ed modulesok = ?RCC MAKE RCC,

29

%% Cal l standard ueh i n i t func t i onConfigUpdated = ueh he lpe r : i n i t p e r s u i t e u e h ( Config ) ,

%% Add any t e s t s u i t e s p e c i f i c i n i t a c t i on s here

%% Return t e s t s u i t e c on f i g[{ conf , random conf ( )} | ConfigUpdated ] .

%%%===========================================================================%% @spec end pe r s u i t e ( Config0 )%%%% −> void ( ) | { s ave con f i g , Config1}%%%% where%%%% ConfigX = [ tup l e ( ) ]%%%% @doc%% <pre>%% end pe r s u i t e i s meant to be used f o r c l e an ing up%% a f t e r i n i t p e r s u i t e . The f o l l ow ing i s done :%%%% − Close t e l n e t port to RNC and 3Gsim%% − Close MoShell port to RNC%% − Delete post check con t r o l f i l e%% </pre>%% @end%%%===========================================================================end pe r s u i t e ( Config ) −>

%% Test s u i t e s p e c i f i c i n i t a c t i on s

%% Cal l standard func t i on to c l o s e mos and t e l n e t connect ions%% and d i s ab l e standard t r a c e sok = ueh he lpe r : end pe r su i t e u eh ( Config ) ,

ok .

%%%===========================================================================%% @spec i n i t p e r t e s t c a s e ( TestCase , Config0 )%%%% −> Config1 | { skip , Reason} | { sk ip and save , Reason , Config1}%%%% where%%%% TestCase = atom ( )%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%%%% @doc%% <pre>%% This part conta in s a c t i on s which must be done be f o r e each t e s t case .%% The f o l l ow ing i s done :%%%% − A check i s made to see i f the t e s t c a s e name i s ” t c i n i t ” or%% ” t c i n i t e n d ” . No ac t i on i s performed f o r those t e s t ca s e s .%% − Then a check i s made to see i f the cur rent t e s t case i s a post check%% t e s t case by checking f o r s t r i n g ” pos t check ” in the t e s t case name .%% − I f i t i s not a postcheck t e s t ca s e , the f o l l ow ing ac t i on s are done :%% − Target monitor i s s t a r t ed .%% − MoShell undo mode i s s t a r t ed to save undo commands to a f i l e .%% − Test case name , s t a r t t ime and al lowed postcheck t e s t c a s e s are wr i t t en%% to the postcheck con t r o l f i l e .%%%% − I f i t i s a postcheck t e s t ca s e , the f o l l ow i ng ac t i on s are done :%% − A search f o r the whole t e s t case name i s done in the postcheck con t r o l%% f i l e .%% − I t i s checked i f the main t e s t case returned ”TcOk” .%% − I f both c r i t e r i a s above are f u l f i l l e d , the postcheck t e s t c a s e i s run ,%% otherwi se i t i s sk ipped .%%%% </pre>

30

%% @end%%%===========================================================================i n i t p e r t e s t c a s e ( t c i n i t , Config ) −>

ueh he lpe 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 , Config , ?MODULE) ;

i n i t p e r t e s t c a s e ( t c i n i t e nd , Config ) −>ueh he lpe 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 nd , Config , ?MODULE) ;

i n i t p e r t e s t c a s e ( TestCase , Config ) −>ueh he lpe r : c h e c k t c i n i t r u n ( Config , ?MODULE) ,TgsPid = rcc suppor t : ge t hand l e (?RCC TGS PID , Config ) ,RncPid = rcc suppor t : ge t hand l e (?RCC RNC PID, Config ) ,MonConf = ct : g e t c o n f i g ( rnc monitor ) ++

[{ t e l n e t , c t : g e t c o n f i g ( host ) } ] ,

MonConfTgs= ct : g e t c o n f i g ( tgs moni tor ) ++[{ t e l n e t , c t : g e t c o n f i g ( t g s ho s t ) } ] ,

NewConfig = [{?RCC TESTCASE, TestCase} | Config ] ,{ok , RncMonPid} = rc c th : i n i t tm (NewConfig , ?RCC RNC MONITOR) ,{ok , TgsMonPid} = rc c th : i n i t tm (NewConfig , ?RCC TGS MONITOR) ,{ok , } = rcc mos : start mos undo mode (NewConfig ) ,

case RncMonPid o fundef ined −>%% This i s postcheck t e s t case− do nothing

ok ;−>

%% Stop and de l e t e a l l UE’ s in case some are hanging from prev ious%% crashed t e s t c a s er c c t g s : s t op de l u e (TgsPid , ” a l l ” ) ,

%% Star t t a r g e t monitorcpp tm : s t a r t mon i t o r (RncMonPid , MonConf , RncPid ) ,cpp tm : s t a r t mon i t o r (TgsMonPid , MonConfTgs , TgsPid ) ,

%% Add the code f o r ext ra t r a c e sMosPid = rcc suppor t : ge t hand 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 , Config , MosPid )

end ,

%% Return con f i g parameters[{ t e s t ca s e , TestCase } ,{?RCC RNC MON PID, RncMonPid} ,{?RCC TGS MON PID, TgsMonPid} | NewConfig ] .

%%%===========================================================================%% @spec end p e r t e s t c a s e ( TestCase , Config0 )%%%% −> void ( ) | { s ave con f i g , Config1} | { f a i l , Reason}%%%% where%% TestCase = atom ( )%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%%%% @doc%% <pre>%% This part conta in s a c t i on s which must be done a f t e r each t e s t case .%% The f o l l ow ing i s done :%%%% − A check i s made to see i f the t e s t c a s e name i s ” t c i n i t ” or%% ” t c i n i t e n d ” .%% No act i on i s performed f o r those t e s t ca s e s .%% − Then a check i s made to see i f the cur rent t e s t case conta in s s t r i n g%% ” pos t check ” .%% − I f i t i s not a postcheck t e s t ca s e , the f o l l ow ing ac t i on s are done :%% − Target monitor i s stopped .%% − Any remaining UE’ s are stopped and de l e t ed in 3Gsim .%% − Al l Mo changes are r e s t o r ed by running the t e s t c a s e undo f i l e .%% − The end time and t e s t c a s e v e rd i c t i s wr i t t en to the postcheck con t r o l%% f i l e .%%

31

%% − I f i t i s a postcheck t e s t ca s e , no a c t i on s are done .%% </pre>%% @end%%%===========================================================================

end pe r t e s t c a s e ( t c i n i t , Config ) −>Config ;

e nd p e r t e s t c a s e ( t c i n i t e nd , Config ) −>Config ;

e nd p e r t e s t c a s e ( TestCase , Config ) −>RncPid = rcc suppor t : ge t hand l e (?RCC RNC PID, Config ) ,RncMonPid = rcc suppor t : ge t hand l e (?RCC RNC MON PID, Config ) ,ModuleBoards = rcc suppor t : ge t boards (module , Config ) ,

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

case RncMonPid o fundef ined −>

%% This i s postcheck t e s t case− do nothingok ;

−>%% Remove t r a c e sr c c th run : s t op ue i d t r a c e (RncPid , ModuleBoards ) ,r c c t h : stop tm ( Config , ?RCC RNC MONITOR) ,r c c th : stop tm ( Config , ?RCC TGS MONITOR) ,rcc mos : stop mos undo mode ( Config ) ,

%% Remove any custom t r a c e sMosPid = rcc suppor t : ge t hand l e (?RCC MOS PID, Config ) ,

r c c t h : s t o p c o n f i g t r a c e s ( TestCase , Config , MosPid )end ,

Config .

%%%===========================================================================%% @spec groups ( ) −> [ Group ]%%%% @doc%% <pre>%% Group = {GroupName , Proper t i e s , GroupsAndTestCases}%% GroupName = atom ( )%% Prope r t i e s = [ p a r a l l e l | sequence | Shu f f l e | {RepeatType , N} ]%% GroupsAndTestCases = [ Group | {group , GroupName} | TestCase ]%% TestCase = atom ( )%% Shu f f l e = s h u f f l e | { s hu f f l e , Seed}%% Seed = { i n t e g e r ( ) , i n t e g e r ( ) , i n t e g e r ( )}%% 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 | r ep e a t un t i l a ny ok |%% r e p e a t u n t i l a n y f a i l%% N = in t e g e r ( ) | f o r e v e r%%%% Desc r ip t i on :%% A t e s t case group i s a s e t o f t e s t ca s e s that share%% con f i gu r a t i on func t i on s and execut ion p r op e r t i e s .%%%% To sp e c i f y in which order groups should be executed%% ( a l s o with r e sp e c t to t e s t ca s e s that are not part%% of any group ) , tup l e s on the form {group , GroupName}%% should be added to the 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%%%===========================================================================groups ( ) −>

[{ t g r p i n i t , [ ] ,[ t c i n i t ]} ,

{ tgrp rob , [ sequence ] ,[ t c rob ,{ tgrp rob pc , [ p a r a l l e l ] ,

[ t c rob pos t check tg s im , t c r ob po s t c h e c k e x c e r r ] } ] } ,

32

{ t g rp rob v r f , [ sequence ] ,[ t c r ob v r f ,{ t g rp r ob v r f p c , [ p a r a l l e l ] ,

[ t c r ob v r f po s t ch e ck t g s im , t c r o b v r f p o s t c h e c k e x c e r r ] } ] } ,

{ t g rp i n i t end , [ ] ,[ t c i n i t e n d ]} ,

{ t g rp t c s , [ ] ,[{ tg rp tc , [ sequence ] , [ t c rob , t c r o b v r f ]} ,{ tgrp pc , [ p a r a l l e l ] ,

[ t c rob pos t check tg s im , t c r ob po s t ch e ck ex c e r r ,t c r ob v r f po s t ch e ck t g s im , t c r o b v r f p o s t c h e c k e x c e r r ] } ] } ,

{ t g r p a l l , [ ] ,[ t c i n i t , {group , t g r p t c s } , t c i n i t e n d ] } ] .

%%%===========================================================================%% @spec i n i t p e r g r oup (GroupName , Config0 )%%%% −>%% Config1 | { skip , Reason} | { sk ip and save , Reason , Config1}%%%% where%% GroupName = atom ( )%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%%%% @doc%% <pre>%% in i t p e r g r oup i s c a l l e d be f o r e each t e s t case%% in the s u i t e . I t t y p i c a l l y conta in s i n i t i a l i z a t i o n%% which must be done f o r each t e s t case .%%%% Note that i n i t p e r t e s t c a s e i s a l s o executed , no matter i f the case%% belongs to a group or not .%%%% Return a l i s t o f c on f i gu r a t i on param/ value tup l e s .%% </pre>%% @end%%%===========================================================================in i t p e r g r oup ( GroupName , Config ) −>

%% I n i t i a l i z a t i o n needed f o r the groupct : comment(”−−−−−−−−−− −−−−−−−−−− −−−−−−−−−−”),Config .

%%%===========================================================================%% @spec end per group (GroupName , Config0 )%%%% −>%% void ( ) | { s ave con f i g , Config1} | { f a i l , Reason}%% where%%%% GroupName = atom ( )%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%%%% @doc%% <pre>%% end per group i s c a l l e d a f t e r each t e s t case has%% f in i sh ed , g i v ing the opportunity to perform clean−up%% a f t e r i n i t p e r g r oup .%%%% Note that i n i t p e r t e s t c a s e i s a l s o executed , no matter i f the case%% belongs to a group or not .%%%% Return ok .%% </pre>%% @end%%%===========================================================================

33

end per group ( GroupName , Conf ig ) −>%% Cleanup what was i n i t i a t e d in i n i t p e r g r oupct : comment(”−−−−−−−−−− −−−−−−−−−− −−−−−−−−−−”),ok .

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

%%%===========================================================================%% @spec t c i n i t ( Config0 )%%%% −>%% ok | e x i t ( ) | { skip , Reason} | {comment , Comment} |%% { s ave con f i g , Config1} | { sk ip and save , Reason , Config1}%%%% where%%%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%% Comment = term ( )%%%% @doc%% <pre>%% This i s an i n i t t e s t case s p e c i f i c a l l y f o r the robustnes s t e s t s u i t e .%% I t must be executed be f o r e any o f the other t e s t ca s e s .%% i n i t p e r t e s t c a s e and end pe r t e s t c a s e w i l l not be run f o r t h i s TC.%% The f o l l ow ing i s done :%%%% − MoShell undo mode i s s t a r t ed%% − Act ivate the r equ i r ed f e a t u r e s%% − Set channel sw i t ch ing t imers to low va lues in order to t r i g g e r%% downswitch and f a i l e d t e s t c a s e due to throughput problems .%%%% </pre>%% @end%%%===========================================================================t c i n i t ( Config ) −>

TgsPid = rcc suppor t : ge t hand l e (?RCC TGS PID , Config ) ,MosPid = rcc suppor t : ge t hand l e (?RCC MOS PID, Config ) ,

%% Setup RNC Conf igurat ion

%%===========================================%% Star t undo mode%%===========================================ueh he lpe r : o p e n t c i n i t u n d o f i l e ( Config , ?MODULE) ,

%% Disab le MoShell con f i rmat ion f o r b l /deb/ s e t{ok , } = cpp mos : expect (MosPid ,

”uv b ld eb s e t con f i rmat i on =0”,[ ” b ld eb s e t con f i rmat i on =0”] ,[{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Restor ing UtranCel l changes 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 saved in CV by mistake{ok , } = cpp mos : expect (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 ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (MosPid , ” s e t u t r a n c e l l=iub−8−1 uarfcnDl 10562” ,

[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (MosPid , ” s e t u t r a n c e l l=iub−8−1 uarfcnUl 9612” ,

[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (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 ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (MosPid , ” s e t u t r a n c e l l=iub−8−2 uarfcnDl 10562” ,

[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (MosPid , ” s e t u t r a n c e l l=iub−8−2 uarfcnUl 9612” ,

[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,{ok , } = cpp mos : expect (MosPid ,

” s e t UtranCel l=Iub−7−3 transmiss ionScheme 0” ,[ ” Total ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

34

%% Act ivate the r equ i r ed f e a t u r e s

%% Set 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 to Disabled .{ok , } = cpp mos : expect (MosPid ,

” s e t rn c f e a tu r e f e a t u r e s t a t e 0” ,[ ” Total ” ] , [{ timeout , ?RCC MOS BIG TIMEOUT} , l i n e , send ] ) ,

%% Act ivate a l l RabCombination f e a t u r e s{ok , } = cpp mos : expect (MosPid ,

” s e t rn c f e a tu r e=rabcombination f e a t u r e s t a t e 1” ,[ ” Total ” ] , [{ timeout , ?RCC MOS BIG TIMEOUT} , l i n e , send ] ) ,

%% Act ivate add i t i ona l l i c e n c e s{ok , } = cpp mos : expect (MosPid ,

” s e t rn c f e a tu r e=HsdpaMobilityPhase f e a t u r e s t a t e 1” ,[ ” Total ” ] , [{ timeout , ?RCC MOS BIG TIMEOUT} , l i n e , send ] ) ,

%% Time in s a f t e r which a connect ion with low throughput i s downswitched%% from HS−DSCH to CELL FACH.{ok , } = cpp mos : expect (MosPid ,

” s e t channe l sw i tch ing hsdschInact iv i tyTimer 3” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Time in 0 .1 s a f t e r which a CPC act i va t ed connect ion with low%% throughput i s downswitched from CELL DCH to CELL FACH. This parameter%% i s used in s t ead o f hsdschInact iv i tyTimer f o r CPC ac t i va t ed%% connect ions .{ok , } = cpp mos : expect (MosPid ,

” s e t channe l sw i tch ing hsdschInact iv i tyTimerCpc 30” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Time in 0 .1 s a f t e r which an i n a c t i v e RB in a RAB combination%% conta in ing 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 : expect (MosPid ,

” s e t channe l sw i tch ing inac t i v i t yT imeMul t iPs In t e ra c t i v e 30” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Time in s a f t e r which an i n a c t i v e connect ion in CELL FACH s ta t e i s%% downswitched to URA PCH s t a t e .{ok , } = cpp mos : expect (MosPid ,

” s e t channe l sw i tch ing inac t i v i tyT imer 3” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Lock HSDPA to c r ea t e R99 c e l l s{ok , } = cpp mos : expect (MosPid , ” b l u t r a n c e l l=iub−3−1,Hsdsch ” ,

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

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

[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Add the below s e t t i n g s so that the output f i l e s match the ba s e l i n e%% f i l e s{ok , } = cpp mos : expect (MosPid ,

” s e t handover fddIfhoSupp 1” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

{ok , } = cpp mos : expect (MosPid ,” s e t rnc func t i on hsCellChangeAllowed 1” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Act ivate Dch and Hspa IFLS f e a t u r e s{ok , } = cpp mos : expect (MosPid ,

” s e t rn c f e a tu r e=DchLoadSharing f e a t u r e s t a t e 1” ,[ ” Total ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

{ok , } = cpp mos : expect (MosPid ,” s e t rn c f e a tu r e=HspaLoadSharing f e a t u r e s t a t e 1” ,[ ” Total ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

{ok , } = cpp mos : expect (MosPid ,” s e t rn c f e a tu r e=I f I ra tMobi l i tyHsdpaEul f e a t u r e s t a t e 1” ,[ ” Total ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Set handover and rnc func t i on parameters

35

{ok , } = cpp mos : expect (MosPid ,” l s e t RncFunction=1,Handover=1 i f l sH y s t 20” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

{ok , } = cpp mos : expect (MosPid ,” l s e t RncFunction=1$ hsOnlyBestCel l 0” ,[ ”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%% Remove u t r an r e l a t i o n from Iub−3 and IUb−4 to other Iub ’ sok = cpp mos : send (MosPid ,

” de l UtranCel l=Iub−3−[1−6] , u t r an r e l a t i o n=Intra−Iub−6”) ,{ok , } = cpp mos : expect (MosPid , ”y” , [ ”MOs de l e t ed ” ] ,

[{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,ok = cpp mos : send (MosPid ,

” de l UtranCel l=Iub−3−[1−6] , u t r an r e l a t i o n=Inter−Iub−6”) ,{ok , } = cpp mos : expect (MosPid , ”y” , [ ”MOs de l e t ed ” ] ,

[{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

% %% Coverage r e l a t i o n s cannot be de f i n e un t i l TR HO40784% %% has been f i x ed in 3gsim .%% %% HS s e l e c t i o n coverage r e l a t i o n s% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−4−3, c ov e r a g e r e l a t i o n=Iub−4−3 Iub −3−5”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−3−5”,% [” Proxy ID =”] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−3−6, c ov e r a g e r e l a t i o n=Iub−3−6 Iub −3−3”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−3−3”,% [” Proxy ID =”] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−4−3 Iub−3−5 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=0, h sCe l l S e l e c t i o n =1,hsLoadSharing=0”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−3−6 Iub−3−3 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=0, h sCe l l S e l e c t i o n =1,hsLoadSharing=0”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% %% HS loadshar ing coverage r e l a t i o n s% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−3−4, c ov e r a g e r e l a t i o n=Iub−3−4 Iub −4−1”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−4−1”, [ ” Proxy ID =”] ,% [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−3−4, c ov e r a g e r e l a t i o n=Iub−3−4 Iub −3−2”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−3−2”, [ ” Proxy ID =”] ,% [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−3−4 Iub−4−1 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=0, h sCe l l S e l e c t i o n =0,hsLoadSharing=1”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−3−4 Iub−3−2 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=0, h sCe l l S e l e c t i o n =0,hsLoadSharing=1”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−4 hs I f l sMarg inUse r s 30” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−4 hs I f l sThr e shUse r s 1” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−4 i f l sMode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

36

%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−2 hs I f l sMarg inUse r s 20” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−2 hs I f l sThr e shUse r s 5” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−2 i f l sMode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−1 hs I f l sMarg inUse r s 20” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−1 hs I f l sThr e shUse r s 5” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−1 i f l sMode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% %% DCH loadshar ing coverage r e l a t i o n s% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−4−2, c ov e r a g e r e l a t i o n=Iub−4−2 Iub −4−4”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−4−4”,% [” Proxy ID =”] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% ok = cpp mos : send (MosPid ,% ” cr u t r a n c e l l=Iub−4−2, c ov e r a g e r e l a t i o n=Iub−4−2 Iub −3−6”),% {ok , } = cpp mos : expect (MosPid ,% ”RncFunction=1,UtranCel l=Iub−3−6”,% [” Proxy ID =”] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−4−2 Iub−4−4 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=1, h sCe l l S e l e c t i o n =0,hsLoadSharing=0”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t c ov e r a g e r e l a t i o n=Iub−4−2 Iub−3−6 r e l a t i o nCapab i l i t y ”% ”dchLoadSharing=1, h sCe l l S e l e c t i o n =0,hsLoadSharing=0”,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−2 dchIf lsMarginCode 90” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−2 dchIf lsMarginPower 90” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−2 dchIf l sThreshCode 1” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−2 dchIf l sThreshPower 1” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−2 i f l sMode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−4 dchIf lsMarginCode 60” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−4 dchIf lsMarginPower 60” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−4 dchIf l sThreshCode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−4 dchIf l sThreshPower 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−4−4 i f l sMode 2” ,

37

% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,%% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−6 dchIf lsMarginCode 50” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−6 dchIf lsMarginPower 50” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−6 dchIf l sThreshCode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−6 dchIf l sThreshPower 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,% {ok , } = cpp mos : expect (MosPid ,% ” s e t UtranCel l=Iub−3−6 i f l sMode 2” ,% [”1 MOs s e t ” ] , [{ timeout , ?RCC MOS TIMEOUT} , l i n e , send ] ) ,

%%===========================================%% Save undo f i l e%%===========================================ueh he lpe r : c l o s e t c i n i t u n d o f i l e ( Config , ?MODULE) ,

%% Setup 3GSim Conf igurat ion

Tr igge r s = ge t c on f ( tb , Config ) ,TriggersN =

[ s t r i n g : j o i n ( l i s t s : dup l i c a t e (4 , l i s t s : nth (1 , Tr igge r s ) ) , ” , ” ) ,s t r i n g : j o i n ( l i s t s : dup l i c a t e (5 , l i s t s : nth (2 , Tr igge r s ) ) , ” , ” ) ,s t r i n g : j o i n ( l i s t s : dup l i c a t e (7 , l i s t s : nth (3 , Tr igge r s ) ) , ” , ” ) ] ,

%% Def ine any s p e c i f i c T r a f f i c Behaviours%% Tra f f i c Behaviour ” d ch t o f a ch t o u r a ”%% Ue 000001{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb in t 64 20 s p s i n t f a c h u r a f a c h ” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb p s i n t f a c h u r a f a c h −wa 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 , TriggersN)++” −r ab s t a t e in t 64 64 , cch , i n t u ra ura , cch”” −u l p a ck e t r a t e 50 ,0 ,0 ,20 −d l p a ck e t r a t e 50 ,0 ,0 ,20”” −v a l i d r a b s t a t e s ∗ , cch , i n t u ra ura , cch −mm −,−,−,−”” −sm ac t i va t e 1 ,− ,− ,−”, [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% 3xPsIntEUL HS%% Ue 000002{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb eu lh s 20 s 3xPsIntEUL HS” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb 3xPsIntEUL HS −mm −,−,−,−,− −t r i g g e r s ”” ”++ l i s t s : nth (2 , TriggersN)++” −wa i t b e f o r e s t a r t 2000”” −r ab s t a t e i n t e u l h s , 2 x i n t eu l h s , 3 x i n t eu l h s , ”

”2 x i n t eu l h s , i n t e u l h s ” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb 3xPsIntEUL HS −v a l i d r a b s t a t e s ∗ ,∗ ,∗ ,∗ ,∗”” −sm ac t i va t e 1 , a c t i va t e 2 , a c t i va t e 3 , ”

” deac t i va t e 2 , d ea c t i v a t e 3 ” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb 3xPsIntEUL HS −u l r l c s d u s i z e 50 ,70 ,50 ,70 ,50”” −u l p a ck e t r a t e 50 ,50 ,50 ,50 ,50”” −d l r l c s d u s i z e 100 ,100 ,100 ,100 ,100”” −d l p a ck e t r a t e 70 ,50 ,70 ,50 ,70” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb 3xPsIntEUL HS −u l r l c s d u s i z e 2 0 ,50 ,70 ,0 ,0”” −u l p a c k e t r a t e 2 0 ,50 ,20 ,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 ,25 ,17 ,0 ,0” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

38

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb 3xPsIntEUL HS −u l r l c s d u s i z e 3 0 ,0 ,100 ,80 ,0”” −u l p a c k e t r a t e 3 0 ,0 ,50 ,50 ,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 ,50 ,17 ,0” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Tra f f i c Behaviour ” speech + PsInt ”%% Ue 000003{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb in t 64 20 s s p i n t ” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb sp i n t −wa 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 , TriggersN)++” −r ab s t a t e i n t e u l h s , s p e e ch 1 2 2 i n t e u l h s , ”” sp e e ch 12 2 i n t 0 0 , s p e e ch 12 2 2x i n t eu l h s , ”” s p e e ch 1 2 2 i n t e u l h s , 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 ac t i va t e 1 ,− ,− , a c t i va t e 2 , deac t i va t e 1 , ”” deac t i va t e 2 , a c t i v a t e 1 ” , [ ”EXECUTED” ] ,

[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim mb sp i n t −u l p a ck e t r a t e 50 ,70 ,0 ,60 ,0 ,0 ,60”” −u l r l c s d u s i z e 100 ,80 ,0 ,100 ,0 ,0 ,80”” −d l p a ck e t r a t e 50 ,50 ,0 ,50 ,0 ,0 ,50”” −d l r l c s d u s i z e 100 ,80 ,0 ,100 ,0 ,0 ,80” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb sp i n t −u l p a c k e t r a t e 2 0 ,0 ,0 ,60 ,70 ,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 ,50 ,70 ,0 ,0”” −d l r l c s d u s i z e 2 0 ,0 ,0 , 50 ,70 ,0 , 0” , [ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Mobi l i ty i n t e r v a l sI n t e r v a l s = ge t c on f (mb, Config ) ,

%% Copy random c e l l s mob i l i ty behavior and reduce l e g change i n t e r v a l%% Ue 000001{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb random ce l l s r andom ce l l s 3 s ” ,[ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb random ce l l s 3 s − l e g c h ang 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” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Copy random c e l l s mob i l i ty behavior and reduce l e g change i n t e r v a l%% Ue 000002{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb random ce l l s r andom ce l l s 4 s ” ,[ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb random ce l l s 4 s − l e g c h ang 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” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Copy random c e l l s mob i l i ty behavior and reduce l e g change i n t e r v a l%% Ue 000003{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cb random ce l l s r andom ce l l s 5 s ” ,[ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim mb random ce l l s 5 s − l e g c h ang 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” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Def ine ims i 000001 − 000010 with de f au l t HLR sub s c r i b e r data p r o f i l er c c t g s : d e f i n e h l r s u b s (TgsPid ,”000001” ,”10”) .

%%%===========================================================================%%%% −>%% ok | e x i t ( ) | { skip , Reason} | {comment , Comment} |%% { s ave con f i g , Config1} | { sk ip and save , Reason , Config1}%%%% where%%%% ConfigX = [ tup l e ( ) ]%% Reason = term ( )%% Comment = term ( )%%%% @doc%% <pre>%% This i s an i n i t end t e s t case f o r IFLS f e a tu r e .%% I t must be executed at the end o f%% the t e s t s u i t e to r e s t o r e a l l changes . The f o l l ow ing i s done :%%%% − MoShell undo f i l e i s run to r e s t o r e MO changes%% − 3Gsim d e f i n i t i o n s are de l e t ed .%% </pre>%% @end%%%===========================================================================t c i n i t e n d ( Config ) −>

r c c t g s : c leanup 3gs im ( Config ) ,

%% Undo MO s e t t i n g s from t c i n i t commandueh he lpe r : r u n t c i n i t u n d o f i l e ( Config , ?MODULE) .

%%%===========================================================================%% @spec t c rob ( Config0 )%%%===========================================================================tc rob ( Config ) −>

%% UEs{UEs , SCs , , , Delays} = ge t con f ( Config ) ,

%% Read con f i g parametersTgsPid = rcc suppor t : ge t hand l e (?RCC TGS PID , Config ) ,TestCase = rcc suppor t : ge t hand l e (?RCC TESTCASE, Config ) ,RncPid = rcc suppor t : ge t hand l e (?RCC RNC PID, Config ) ,ModuleBoards = rcc suppor t : ge t boards (module , Config ) ,

%% Setup 3GSim Conf igurat ion

%% Sleep 1 s

%% Create UE [ sc = s t a r t c e l l , c = c e l l to s t a r t in ,%% 3gsim cu=help , bn=b#=den man r i n g e r t i l l ]{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim cu − i ”++ l i s t s : nth (1 ,UEs)++” −sc ”++ 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 random ce l l s 3 s ”” −c a p a b i l i t i e s eu l −e l a l l −ns ” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim cu − i ”++ l i s t s : nth (2 ,UEs)++” −sc ”++ l i s t s : nth (2 , SCs)++” −c ∗”” −tb 3xPsIntEUL HS −mb random ce l l s 4 s ”” −c a p a b i l i t i e s eu l −e l a l l −ns ” ,

40

[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim cu − i 000004 −c 1015”” −tb cs mt −c a p a b i l i t i e s r99 −ns ” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim cu − i ”++ l i s t s : nth (3 ,UEs)++” −sc ”++ l i s t s : nth (3 , SCs)++” −c ∗”” −tb s p i n t −mb random ce l l s 5 s −c a p a b i l i t i e s eu l ”” −e l a l l −ns −bn 000004” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

%%=========================================================%% Star t ue id t r a c e on UE%%=========================================================l i s t s : f o r each (

fun (Ue) −>r c c th run : s t a r t u e i d t r a c e (RncPid , ModuleBoards , Ue)

end , UEs) ,

cpp t imer : s l e ep ( ct : g e t c o n f i g ( host ) , c t : g e t c o n f i g ( cpp t ime s e rve r ) , 1 ) ,{ok , } = cpp t e l n e t : expect (TgsPid , ”3 gsim stau − i a l l ” ,

[ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

%% Sleep 30 scpp t imer : s l e ep ( ct : g e t c o n f i g ( host ) , c t : g e t c o n f i g ( cpp t ime s e rve r ) , 30) ,

%% Stop and de l e t e Ue{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim stou − i ”++ l i s t s : nth (1 ,UEs)++”−”++ l i s t s : nth (3 ,UEs) ,[ ”EXECUTED” ] ,[{ timeout , ?STOU TIMEOUT} , {prompts , un l imited } , send ] ) ,

r c c t g s : s t op de l u e (TgsPid , ” a l l ” ) ,r c c suppor t : c h e c k u e c t x t r e l e a s e ( Config , 1 0 ) ,

%% Get monitor f i l e nameFileName = cpp tm : moni tor f i l ename ( [{ tgs monitor ,

TestCase ,Config ,r c c suppor t : g e t l o g d i r ( Config ) ,c t : g e t c o n f i g ( mon i t o r l o g pa r s e r ) } ] ) ,

%% Purge o ld mob i l i ty f i l e sl i s t s : f o r each (

fun (Ue) −>ok = cpp t e l n e t : send (TgsPid ,

”rm −f /c /3gsim/measurement data/ue”++Ue++”.mob”)end , UEs) ,

%% Result from pars ing l o g f i l eUeTriggers = par s e 3g s im log ( FileName , Config ) ,

%% Ver i fy t r i g g e r sUeTriggersLength = 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 ) ,PathShort = ” l o g p r i v a t e/”++

a t om t o l i s t ( p r o p l i s t s : g e t va lu e ( t e s t ca s e , Config))++” . shor t . l og ” ,

case ( UeTriggersLength ) o f[ ] −> ct : comment( i o l i b : fw r i t e (

”< f ont c o l o r=\”gold\”>NO TRAFFIC</font><br>˜n˜p” ,[ g e t c on f ( Config ) ] ) ) ;

−> ct : comment( i o l i b : fw r i t e (”˜p<br>˜n<a h r e f=\”˜s\”>Short log </a><br>˜n˜p” ,[ UeTriggersLengthUe , PathShort , g e t c on f ( Config ) ] ) )

end ,

41

ct : l og ( yel low bg , ”UeTriggers (˜p ) : ˜p˜n” ,[ UeTriggersLength , UeTriggers ] ) ,

%% Wait be f o r e s t a r tGetDelay = fun (Ue) −>

{ l i s t s : nth ( l i s t t o i n t e g e r (Ue) , Delays ) ,”−” ,”−”} end ,

%% Create mob i l i ty f i l eCreateMobFile = l i s t s : f o r each (

fun ({Ue , Tr igge r s }) −>ueh 3gs im he lper : t g s c r e a t e m o b i l i t y f i l e (TgsPid ,

[ GetDelay (Ue) | de lay 2b ( Tr igge r s ) ] , ”ue”++Ue++”.mob”)end , UeTriggers ) .

%%%===========================================================================%% @spec t c r o b v r f ( Config0 )%%%===========================================================================t c r o b v r f ( Config ) −>

%% UEs{UEs , SCs , , , } = ge t con f ( Config ) ,

%% Read con f i g parametersTgsPid = rcc suppor t : ge t hand l e (?RCC TGS PID , Config ) ,TestCase = rcc suppor t : ge t hand l e (?RCC TESTCASE, Config ) ,RncPid = rcc suppor t : ge t hand l e (?RCC RNC PID, Config ) ,ModuleBoards = rcc suppor t : ge t boards (module , Config ) ,

c pp t e l n e t : expect (TgsPid ,”3 gsim cu − i ”++ l i s t s : nth (1 ,UEs)++” −c ”++ l i s t s : nth (1 , SCs)++” −aac ∗”” −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 eu l −e l a l l −ns ” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

c pp t e l n e t : expect (TgsPid ,”3 gsim cu − i ”++ l i s t s : nth (2 ,UEs)++” −c ”++ l i s t s : nth (2 , SCs)++” −aac ∗”” −tb 3xPsIntEUL HS −mf ue”++l i s t s : nth (2 ,UEs)++”.mob”” −c a p a b i l i t i e s eu l −e l a l l −ns ” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

{ok , } = cpp t e l n e t : expect (TgsPid ,”3 gsim cu − i 000004 −c 1015”” −tb cs mt −c a p a b i l i t i e s r99 −ns ” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

c pp t e l n e t : expect (TgsPid ,”3 gsim cu − i ”++ l i s t s : nth (3 ,UEs)++” −c ”++ l i s t s : nth (3 , SCs)++” −aac ∗”” −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 eu l −e l a l l −ns”” −bn 000004” ,[ ”EXECUTED” ] ,[{ timeout , ?CU TIMEOUT} , {prompts , un l imited } , send ] ) ,

%%=========================================================%% Star t ue id t r a c e on UE%%=========================================================l i s t s : f o r each (

fun (Ue) −>r c c th run : s t a r t u e i d t r a c e (RncPid , ModuleBoards , Ue)

end , UEs) ,

cpp t imer : s l e ep ( ct : g e t c o n f i g ( host ) , c t : g e t c o n f i g ( cpp t ime s e rve r ) , 1 ) ,{ok , } = cpp t e l n e t : expect (TgsPid , ”3 gsim stau − i a l l ” ,

[ ”EXECUTED” ] ,[{ timeout , ?RCC MOS TIMEOUT} , {prompts , un l imited } , send ] ) ,

42

%% Sleep 30 scpp t imer : s l e ep ( ct : g e t c o n f i g ( host ) , c t : g e t c o n f i g ( cpp t ime s e rve r ) , 30) ,

%% Stop and de l e t e Ue{ok , } = cpp t e l n e t : expect (TgsPid ,

”3 gsim stou − i ”++ l i s t s : nth (1 ,UEs)++”−”++ l i s t s : nth (3 ,UEs) ,[ ”EXECUTED” ] ,[{ timeout , ?STOU TIMEOUT} , {prompts , un l imited } , send ] ) ,

r c c t g s : s t op de l u e (TgsPid , ” a l l ” ) ,r c c suppor t : c h e c k u e c t x t r e l e a s e ( Config , 1 0 ) ,

%% Get monitor f i l e nameFileName = cpp tm : moni tor f i l ename ( [{ tgs monitor ,

TestCase ,Config ,r c c suppor t : g e t l o g d i r ( Config ) ,c t : g e t c o n f i g ( mon i t o r l o g pa r s e r ) } ] ) ,

%% Result from pars ing l o g f i l eUeTriggers = par s e 3g s im log ( FileName , Config ) ,

%% Ver i fy executed t r i g g e r sUeTriggersLength = 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 ) ,PathShort = ” l o g p r i v a t e/”++

a t om t o l i s t ( p r o p l i s t s : g e t va lu e ( t e s t ca s e , Config))++” . shor t . l og ” ,

case ( UeTriggersLength ) o f[ ] −> ct : comment( i o l i b : fw r i t e (

”< f ont c o l o r=\”gold\”>NO TRAFFIC</font><br>˜n˜p” ,[ g e t c on f ( Config ) ] ) ) ;

−> ct : comment( i o l i b : fw r i t e (”˜p<br>˜n<a h r e f=\”˜s\”>Short log </a><br>˜n˜p” ,[ UeTriggersLengthUe , PathShort , g e t c on f ( Config ) ] ) )

end ,ct : l og ( yel low bg , ” V e r i f i c a t i o n o f ˜n UeTriggers (˜p ) : ˜p˜n” ,

[ UeTriggersLength , UeTriggers ] ) .

%%%===========================================================================%% @spec t c r ob po s t che ck tg s im ( Config0 )%%%===========================================================================tc rob po s t che ck tg s im ( Config ) −>

Expected = ”” ,r c c pc : t g s e x c ep t i on and e r r o r ch e ck ( Config , Expected ) .

%%%===========================================================================%% @spec t c r ob v r f p o s t ch e ck t g s im ( Config0 )%%%===========================================================================tc r ob v r f p o s t ch e ck t g s im ( Config ) −>

Expected = ”” ,r c c pc : t g s e x c ep t i on and e r r o r ch e ck ( Config , Expected ) .

%%%===========================================================================%% @spec t c r ob po s t c h e c k e x c e r r ( Config0 )%%%===========================================================================tc r ob po s t c h e c k e x c e r r ( Config ) −>

Expected =””,r c c pc : ex c ep t i on and e r r o r che ck ( Config , 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 ( Config0 )%%%===========================================================================t c r o b v r f p o s t c h e c k e x c e r r ( Config ) −>

Expected =””,r c c pc : ex c ep t i on and e r r o r che ck ( Config , Expected ) .

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

43

%%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%% Parse 3gsim l o g f i l e to mob i l i ty f i l e formatpa r s e 3g s im log ( Fi l e , Config ) −>

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

%% Pick eventsPattern = ”\\ [ ( .{23} )\\ ] .+?UE: (\\d++).+?event=(\\d\\w)”

”(?: , [ˆ ,=]+?=(\\d++))?(?: , [ˆ ,=]+?=(\\d++))?” ,

case re : run (Data , Pattern , [{ capture , a l l b u t f i r s t , l i s t } , g l oba l ] ) o f{match , M} −>

Matches = M;nomatch −>

Matches = [ ]end ,

%% Exit i f no matchcase l ength ( Matches ) o f

0 −> %ct : comment(”< f ont c o l o r=\”gold\”>NO TRAFFIC</font >”) ,c t : pa l ( e r ro r , ”NO TRAFFIC” ) ;

−> okend ,

%% Sort out ( d i s t i n c t ) UEsAllUEs = [Ue | | [ | [ Ue | ] ] <− Matches ] ,UEs = l i s t s : u sor t ( AllUEs ) ,

%% Print l og l i n k sp r i n t l o g l i n k s ( F i l e , Config , Data ) ,

%% Ver i fy capturesct : l og ( yel low bg , ”Matches (˜p ) : ˜p˜n” , [ l ength ( Matches ) , Matches ] ) ,

%% Fix format f o r eventsUeActions = l i s t s :map(

fun ( [A,B,C,D,E ] ) −>[A,B,C,D++”−”++E ] ; % 1C

( [A,B,C] ) −>[A,B,C++” ecno ” ,”−”] ; % 2D & 2F events

(A) −>A

end , Matches ) ,

%% Match element p o s i t i o n s & convert to unix timestampUeEvents = [ [U, l og t ime to un ix t ime (H) ,T,M] | | [H,U,M,T] <− UeActions ] ,

%% Reformat to tup l e and c a l c u l a t e time d i f fUeTr iggers = l i s t s :map(

fun (Ue) −>Events = [T | | [H|T] <− UeEvents , H==Ue ] ,{Ue , t im e d i f f t u p l e ( Events )}

end , UEs ) .

%% Calcu la te time d i f f e r e n c e o f tup l e e lements in l i s t ( in ms)t im 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)∗1000) ) ,V1 ,W1} | t im e d i f f t u p l e (Rem ) ] ;t im 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 (100000) ,V,W} ] ;t im e d i f f t u p l e ( [ ] ) −>

[ ] .

%% Converts logt ime to unixtime : 2011−02−01 03 : 4 8 : 0 0 . 7 48 −> 434586454234.748l og t ime to un ix t ime ( Logtime ) −>

Pattern = ”(\\d{4})−(\\d{2})−(\\d{2}) ””(\\d{2} ) : (\\d{2} ) : (\\d{2} )\\ . (\\d{3})” ,

{match , Matches} = re : run ( Logtime , Pattern ,[{ capture , a l l b u t f i r s t , l i s t } ] ) ,

MatchesInt = [ l i s t t o i n t e g e r (M) | | M <− Matches ] ,[ Year , Month ,Day , Hour , Min , Sec , Msec ] = MatchesInt ,

44

ca l endar : da t e t ime to g r ego r i an s e cond s ({{Year , Month , Day} ,{Hour , Min , Sec }}) − 62167219200 + Msec /1000 .

%% Print l og l i n k s & generate shor t l ogp r i n t l o g l i n k s ( F i l e , Config , Data ) −>

ct : l og ( blue bg , ” tgs moni tor l og 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 ename : basename ( F i l e ) , F i l e ] ) ,

Pattern = ”.+( Mobi l i ty Ind | t a r g e t RAB s t a t e | event=| f r o z en ) .+” ,case re : run (Data , Pattern , [{ capture , f i r s t , l i s t } , g l oba l ] ) o f

{match , Lines } −>DataShort = r e f o rma t l o g l i n e s ( Lines ) ,Mat = length ( Lines ) ;

nomatch −>DataShort = [ ] ,Mat = 0

end ,

F i l eSho r t = a t om t o l i s t ( p r o p l i s t s : g e t va lu e ( t e s t ca s e , Config))++” . shor t . l og ” ,

DirShort = p r o p l i s t s : g e t va lu e ( p r i v d i r , Config ) ,c t : l og ( blue bg ,

” tgs moni tor SHORT (˜p) log 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/”++Fi leShort , DirShort++Fi l eShor t ] ) ,

f i l e : w r i t e f i l e ( DirShort++Fi leShort ,i o l i b : fw r i t e (”˜w˜n˜p˜n” ,[ s t r 2 i n t ( g e t c on f ( Config ) ) , DataShort ] ) ) .

%% Reformat log l i n e sr e f o rma t l o g l i n e s ( Lines ) −>

Pattern = ”\\ [ ( .{23} )\\ ] .+UE: (\\d {6} ) : ( .+ ) . ” ,LinesReformat = l i s t s :map(

fun ( Line ) −>{match , Cap} = re : run ( Line , Pattern ,

[{ capture , a l l b u t f i r s t , l i s t } ] ) ,Cap

end , Lines ) ,

%% Sort out ( d i s t i n c t ) UEsAllUEs = [Ue | | [ | [ Ue | ] ] <− LinesReformat ] ,UEs = l i s t s : u sor t ( AllUEs ) ,

%% Sort by UE & Show r e l a t i v e timel i s t s :map(

fun (Ue) −>L i s t = [ [ l og t ime to un ix t ime (T) |A] | | [T | [U|A] ] <−

LinesReformat , U==Ue ] ,{Ue , r e l t ime ( L i s t )}

end , UEs ) .

%% Calcu la te time d i f f e r e n c e r e l a t i v e to the f i r s t l i s t elementr e l t ime ( [ [ T0 |R] | Rem] ) −>

[ s t r i n g : j o i n ( [ ” 0 0 0 . 0 0 0 ” |R] , ” ”) | r e l t ime (Rem, T0 ) ] ;r e l t ime ( [ ] ) −>

[ ] .r e l t ime ( [ [ T1 |R] | Rem] , T0) −>

Tf = ”000000”++ i n t e g e r t o l i s t ( round (1000∗(T1−T0 ) ) ) ,T = s t r i n g : subs t r (Tf , l ength (Tf)−5 , 3)++”.”++

s t r i n g : subs t r (Tf , l ength (Tf )−2) ,[ s t r i n g : j o i n ( [T |R] , ” ”) | r e l t ime (Rem, T0 ) ] ;

r e l t ime ( [ ] , ) −>[ ] .

%% Add 50 ms to 2B events & subt rac t 50 ms from the f o l l ow i ng eventsde lay 2b ( [{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)+50) ,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} | de lay 2b (Rem ) ] ] ;

de lay 2b ( [T | Rem] ) −>

45

[T | de lay 2b (Rem ) ] ;de lay 2b ( [ ] ) −>

[ ] .

%% Get length o f t r i g g e r s p r o p l i s tp 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(fun ({K, V}) −>

{K, length (V)}end ,

P l i s t ) .

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

[ l ength (V) | p l i s t l e n g t h (Rem ) ] ;p l i s t l e n g t h ( [ ] ) −>

[ ] .

%% Generate random con f i grandom conf ( ) −>

UEs = [”000001” ,”000002” ,”000003” ] ,SCs = i n t 2 s t r ( rand (1013 ,1024 ,3 ) ) , %1013−1024 %13 ,14 ,15 %14 ,23 ,24TBs = [”4000” ,”3000” ,”2000” ] ,MBs = [”3000” ,”4000” ,”5000” ] , %3 ,4 ,5 %11 ,7 ,9Delays = [”2250” ,”3240” ,”4260” ] ,{UEs , SCs , TBs , MBs, Delays } .

%% Generate a l i s t o f random i n t e g e r srand (L , H, N) −>

random : seed (now ( ) ) ,l i s t s :map(

fun ( ) −>L+random : uniform (H−L)

end , l i s t s : seq (1 ,N) ) .

%% Converts a l i s t o f i n t e g e r s to s t r i n g si n t 2 s t r ( L i s t ) −>

l i s t s :map(fun (Elem) −>

i n t e g e r t o l i s t (Elem)end ,

L i s t ) .

%% Converts a l i s t o f s t r i n g s to i n t e g e r ss t r 2 i n t ( [ Elem | ]= Int ) 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 con f i gu r a t i on parametersg e t c on f ( Config ) −>

p r o p l i s t s : g e t va lu e ( conf , Config ) .

g e t c on f (Ue , Config ) 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 on f ( Config ) ) ,MT = edo c l i b : t ranspose (M) ,l i s t s : nth (Ue , MT) ;

g e t c on f (Type , Config ) when is atom (Type ) −>Conf = t u p l e t o l i s t ( g e t c on f ( Config ) ) ,Types = [{ ue , 1} , { sc , 2} , {tb , 3} , {mb,4} , {delay , 5 } ] ,TypesIndex = p r o p l i s t s : g e t va lu e (Type , Types ) ,l i s t s : nth ( TypesIndex , Conf ) .

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

46