Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

1

Perfecting Wireless Communications


TTCN
Tree and Tabular Combined Notation
Appendix for CT (UTRAN)
Version 1.0
Perfecting Wireless Communications
TTCN 2
Editing the TTCN Test Suite
Modification of ETSI Test Suites
Changes to downlink messages
Relaxation of receive message constraints
Variation of timer values
Addition of automation (AT) commands
Generation of new Test Cases
Creation of tests not included in the ETSI lists
Combining procedures from several Test Cases
Special Functions
Transceiver control
Perfecting Wireless Communications
TTCN 3
Commonly used Test Steps
SS Create Cell DCH
Creates the cell
Configures physical, transport and logical channels
Generates the signalling radio bearers
Send Default Sys Info
Broadcasts the System Information
Idle Updated
Handles the RRC Connection
Performs Location Update and PS Attach
Perfecting Wireless Communications
TTCN 4
Commonly used Test Steps
CC Basic Service MT / MO
Configures the SETUP message for later in the test
Content depends on the service, rate and parameters
CC Enter Ux
Initiates a call for the defined service to bring the
mobile to the requested call state
MM Authentication
Performs the Authentication exchange and verification
RRC Security
Starts Ciphering and Integrity Checking
From RRC Security, at the end of ts_SS_DownloadSecurityKey is the
transceiver control to start ciphering in either RLC or MAC. The message
sent to the CRLC point of control and observation.
ca_CRLC_SecurityModeCfgReq
(p_CellId: INTEGER; p_Domain : CN_DomainIdentity; p_Hfn:
HyperFrameNumber; p_KC: KeyCiphering; p_Ik: IntegrityKey;
p_GSM_ck: GSM_CipheringKey)
Perfecting Wireless Communications
TTCN 5
Commonly used Test Steps
RRC Set up RAB
Configures and sends the Radio Bearer Setup
CC Check State
Verifies the current state of the mobile
CC Disconnect
To disconnect an active call
RRC Connection Release
Releases the RRC connection in the test postable
Perfecting Wireless Communications
TTCN 6
Default Test Step
More than one Default test step may be active
May ignore PS attach, Routing Area Updates if
not within the test purpose
In the body of the test
Fail verdict on Guard timer expiry
Fail on reception of other unexpected messages
In the preamble or postable
Inconclusive verdict assigned for non-critical failures
If more than one default test step is active, the alternatives are tested in
sequence: Test case, default 1 then default 2...
Perfecting Wireless Communications
TTCN 7
Mobile Terminated Speech Call Test Case
Create Cell
Start sending System Information
Idle Updated (Location Update / PS Attach)
Define the SETUP message and store for later
Page mobile
RRC Connection
Authentication and Security
Send SETUP message
Call Confirm and Connect
Creation of the cell includes
Physical, Transport and Logical Channels
Signalling Radio Bearers
Idle updated performs either Location Update or both LAU and PS Attach
depending on the values of the pc_CS and pc_PS parameters
The Setup message can be very large and take time to configure so it is
always defined at the start of the test case and stored in a variable until
required to be sent to the mobile.
Study
TC 10.1.3.4.1
Perfecting Wireless Communications
TTCN 8
TC 10.1.3.4.1 Expected Sequence
2 -> CONNECT
3 <- STATUS ENQUIRY
4 -> STATUS

Direction Step
UE SS
Message
1 Mobile terminated establishment of Radio Resource
Connection
2 -> PAGING RESPONSE
3 <- AUTHENTICATION REQUEST
4 -> AUTHENTICATION RESPONSE
5 <- SECURITY MODE COMMAND
6 -> SECURITY MODE COMPLETE
7 <- SETUP
8 -> CALL CONFIRMED
B9 -> ALERTING

In the Test Case
Preamble
Perfecting Wireless Communications
TTCN 9
Radio Access Bearer Test Case
Conversational speech and Interactive PS data
Page mobile for a speech call
Start speech call setup
Page mobile for a Packet Switched call
Activate Radio Bearer Test Mode
Set up Radio Bearer
Set the Transport Format Combination
Close UE test mode
Verify data transfer
Radio Access Bearer tests verify that the mobile can set up and maintain
more than one service. For example, Conversational speech at 12.2
kbps and Interactive packet switched data at 3.4kbps.
The mobile is paged and the speech call is established in the normal way.
RAB test mode is activated to decouple the NAS layer so that test data
can be received and looped back by the mobile.
Radio Bearers are set up to handle Speech and PS data
The transport Format Combination is controlled to limit the number of
uplink TFCIs (hence data rates) to the ones required in the test.
Closing the loopback forces the mobile to retransmit any data set from
the test system. On receipt of the data, the test verifies that the data
transfer is correct.
Study 14.1.2.38a
Perfecting Wireless Communications
TTCN 10
TC 14.2.38a Expected Sequence
Direction Step
UE SS
Message Comments
1..6 <--
-->
Paging Use the CS paging procedure for testing of
CS and combined CS/PS reference radio
bearer configurations.

Use the PS paging procedure for testing of
PS reference radio bearer configurations.
7 <-- ACTIVATE RB TEST MODE (DCCH) TC
8 --> ACTIVATE RB TEST MODE COMPLETE (DCCH) TC
9 <-- RADIO BEARER SETUP (DCCH) RRC. For the PS radio bearer the pdcp
info IE must be omitted.
10 --> RADIO BEARER SETUP COMPLETE (DCCH) RRC
11 <-- TRANSPORT FORMAT COMBINATION CONTROL
(DCCH)
RRC
Transport format combinations is limited to
"Restricted UL TFCIs", as specified for the
sub-test
12 <-- CLOSE UE TEST LOOP (DCCH) TC
UE test mode 1
RLC SDU size is for every active radio
bearer set to "UL RLC SDU size", as
specified for the sub-test.
13 --> CLOSE UE TEST LOOP COMPLETE (DCCH) TC
14 <-- DOWNLINK RLC SDU Send test data using the downlink
transport format combination under test

15 --> UPLINK RLC SDU


For Radio Bearer setup see comments column where it states the test
case number.
The limited set of uplink TFCIs is 0,1,2,3,4.
Data is sent continuously and the looped back data is checked for
content and for the Transport Format used.
Perfecting Wireless Communications
TTCN 11
Inter-RAT Handover Test Case
Set up speech call in 3G cell
Physical Information message held in transceiver
until reception of Handover Access bursts
Send Handover from UTRAN Command
Receive Handover Access bursts
Send Physical Information (from the buffer)
Receive Handover Complete
Optional GPRS Suspension
The Physical Information message has to be sent very quickly after the
reception of the Handover Access bursts. Hence it is sent to the
transceivers and held in a buffer until required. The command used is
G_CL2 ! G_CL2_HoldPhyInfo_REQ
Study
TC 8.3.7.4 3G to 2G handover during a speech call
TC 60.1 2G to 3G call handover
Perfecting Wireless Communications
TTCN 12
TC 8.3.7.4 Expected Sequence
Direction Step
UE SS
Message Comments
1 UE To trigger the UE to initialise an MO call
2 ! SETUP U1
3 SS The SS configures a dedicated channel SDCCH on the
GSM cell.
4 " HANDOVER FROM UTRAN
COMMAND-GSM
Send on cell 1 (UTRAN cell) and the message
indicates:
the dedicated channel SDCCH.
5 UE The UE accepts the handover command and switches
to the GSM dedicated channel specified in the
HANDOVER FROM UTRAN COMMAND-GSM
6 ! HANDOVER ACCESS The SS receives this burst on the dedicated channel of
cell 9 (GSM cell) It implies that the UE has switched to
GSM cell.
7 ! HANDOVER ACCESS
8 ! HANDOVER ACCESS
9 ! HANDOVER ACCESS
10 " PHYSICAL INFORMATION
11 ! SABM
12 " UA
13 ! HANDOVER COMPLETE The SS receives the message on the dedicated
channel of GSM cell.

Perfecting Wireless Communications
TTCN 13
RLC Test Case
Enable Radio Bearer Test Mode in the mobile
RLC data sent via Transparent Mode RLC to
MAC so that RLC headers are set in the TTCN
Close loopback command is sent to the mobile
The AM PDU is defined including the RLC
header
Transmission of the AM PDU is via the TM
Mode PCO.
Study TC 7.2.3.12 - Acknowledged mode sequence numbering
The Radio Bearer Test Mode is enabled so that RLC layer is decoupled
from NAS in the mobile. This then permits data transfer to be tested
directly. It is enabled in ts_TC_ActivateRB_TestMode using the
constraint
ca_DataReq ( tsc_CellDedicated, tsc_RB3, c_ActivateRB_TestMode
)
The test system uses transparent mode RLC to simulate AM or UM mode
so that the RLC headers can be set and read by the test case. This is
described in the comments for:
ts_SS_RB_TM_Cfg_RLC
The test loop is closed by the constraint:
ca_DataReq( tsc_CellDedicated,
tsc_RB3,c_CloseUE_TestLoop(p_UE_TestLoopMode,
p_UE_TestLoopMode1LB_Setup))
The AM PDU is sent in defined in
ts_TxAMD_PRBS and defined in the constraint cs_AMD_LIs
and the (looped-back) response is received in the test case
Perfecting Wireless Communications
TTCN 14
Direction Comments Step
UE SS
Message

1 RB ESTABLISHMENT See generic procedures
2 " DOWNLINK RLC PDU
#1

3 " DOWNLINK RLC PDU
#2

Transmission of DOWNLINK PDUs continues
4 ! UPLINK RLC PDU#1 SN should be set to 0
5 ! UPLINK RLC PDU#2 SN should be set to 1
" Transmission of DOWNLINK PDUs continues to SN = 63
6 " DOWNLINK RLC PDU
#64
Poll
7 ! UPLINK STATUS PDU
" Transmission of DOWNLINK PDUs continues, polling every
64
th
PDU, to SN = 4094
8 " DOWNLINK RLC PDU
#4096

9 " DOWNLINK RLC PDU
#4097
SN=0
10 " DOWNLINK RLC PDU
#4098
SN=1, Poll
10a ! UPLINK RLC PDUs UE transmission of UPLINK RLC PDUs continues, polling
every 64
th
PDU, to SN=4094.
On poll, SS acknowledge all received PDUs.
10c ! UPLINK RLC PDU#4096 SN = 4095, Poll (cause: Poll_PDU=64)
10d " STATUS PDU ACK SN up to 4095
12 ! UPLINK RLC PDU#4097 SN should be set to 0
13 ! UPLINK RLC PDU#4098 SN should be set to 1, Poll
14 " DOWNLINK STATUS
PDU


TC 7.2.3.12 Expected Sequence
15
Perfecting Wireless Communications
TTCN
TTCN Editor
Perfecting Wireless Communications
TTCN 16
TTCN Machine Processable format
$BehaviourLine
$LabelId
$Line [7] Dc ! RRC_DataReq
$Cref ca_DataReq ( tsc_CellDedicated, tsc_RB3, cs_Connect (tcv_TI_S ))
$VerdictId
$Comment /* Step 1 */
$End_BehaviourLine
$BehaviourLine
$LabelId TBP
$Line [8] Dc ? RRC_DataInd
$Cref car_UplinkDirectTransfer ( tsc_CellDedicated, tsc_RB3, cr_ConnAck ( tcv_TI_R ))
$VerdictId (P)
$Comment /* Step 2 */
$End_BehaviourLine
Note that the line number is not included in the TTCN file, it is inserted
for convenience by the TTCN Editor.
Conversely, the indentation level is a discrete value in the text file and
this is used to set the indentation of the text in the graphical display.
The text format may be seen using the menu option View | View MP
Perfecting Wireless Communications
TTCN 17
TTCN Editor
Cut, Copy and Paste
Sections, Groups, Test Cases, tables, lines, text
Paste after / paste Into, new group / new object
Add new row in declarations tables
Add new line or local tree header in Test Case
Control indentation of a line or selection of lines
View indentation level
In general, Cut, Copy and Paste are available at every level
Entire section (Declarations part) from one mp file to another
Group of test cases
Test Case
Lines within a test case
Text on lines within the test
Indentation levels may be set on one or more lines using the + and -
buttons.
To view the indentation level, click on Nr on the table header.
Perfecting Wireless Communications
TTCN 18
TTCN Editor - Find
Right click on an identifier
Quick Hyper-find setting
Find - General text search
All found text is highlighted in the tables
Find Identifiers only
Perl registered expressions
. arbitrary character
\w alphanumeric character
* repeat zero or more times
Refer to the Help within Leonardo for some good advice and tips
especially on the Perl registered expressions
For example:
. is used for any character
/s whitespace
/w alphanumeric character
(...) groups a string of characters into one element
+ to repeat the character or string 1 or more times
? to repeat zero or one time
* to repeat zero or more times
Perfecting Wireless Communications
TTCN 19
Update Test Suite Overview
Updated automatically if new Test Cases, Test
Steps or groups are added or moved
If new groups or Test Cases are added,
Selection Expressions should be included
Description fields should be completed
In the Test Suite Structure, the Suite Name must
be unique to avoid overwriting previously build
Test Suites
Note - if new groups or test cases have been added, the selection
reference and the description fields need to be completed.
The Suite Name must be unique since this is used when the test suite is
built to define the location of the resulting files.
20
Perfecting Wireless Communications
TTCN
Practical Session - TTCN Editor
Practical Session - Editing the ATS
Create or copy Test Cases
In a Test Case, add new local tree and new events
Correct the indentation when events are added
Modify dynamic behaviour and other fields
Cut and paste one or more event lines from one Test Case to another
Add / modify constraints
Add / modify declarations
Search for each different type of item
Print out sections
Update the Suite Overview
21
Perfecting Wireless Communications
TTCN
Practical Session
- Creation of new Test Cases
Perfecting Wireless Communications
TTCN 22
Modification of TTCN
General
Make a copy of the TTCN file and change the file
name and the Suite Name in the Overview.
Copy and Modify Existing Code
Re-use Test Steps, Constraints, Declarations
Dynamic Part
Ensure that Alternatives Include all Options
Use a Guard Timer for Protocol Failure
Assign Verdicts for each Section of the Test
Restrictions
Modification of PCOs, ASPs, PDUs, TSOs
The restrictions on modifications to some items exist because system
files provide support for these areas. For example, the system has to
code or decode messages and therefore the rules about coding style,
optional and conditional elements have to be known by the application.
If changes are required to these items, customers are asked to discuss
their requirements with Anite.
Constraints and constants may be used by several Test Cases / Steps.
Hence, if changes are required often best to create new constraints
derived from copies of existing ones.
Dynamic Part
Ensure that alternatives include all options otherwise the test execution
will loop endlessly.
Last entry in a set of qualifiers should cover all other cases
Use ?OTHERWISE in the default test step to catch invalid received
messages.
Use a guard timer to cover protocol failure - value must be large enough
to run test for a slow (new) operator.
Use lots of local trees and test steps since it makes the code readable,
helps with indentation, and names appear in the log file for orientation.
Assign verdicts at the completion of each section of the test, it helps in
the analysis of results.
Use a postable to delete the allocated channels.
Perfecting Wireless Communications
TTCN 23
Generation of a new Test Case
Copy NAS_vx.x.mp, to a new folder and rename
the file
Create a new Group and copy tc_10_1_3_4_1
into the group. Rename the test case
Make one of the changes suggested below
Update the Test Suite Overview
Build the Test Suite
Define and run the Test Campaign
1. Add a delay within the test using a new timer
2. Create a new Paging Response constraint to accept only the correct
classmark2 values as defined by the PIXIT parameters
3. Change the TMSI in the Location Update / Attach Accept message so
that the mobile fails to respond to Paging.
4. Use the MMI command described on the following slide to send a
message to the operator.
5. Create a new PICS parameter to define alternatives at runtime
6. Disable a test case by defining a new Selection Expression dependant
on one or more PICS parameters
7. Use a different type of MS identity in the Paging Request/Response
8. Add a new variable and capture part of a received message then pass
the value to the operator via an MMI command. (Use functions such
as o_ConcatStrg and o_HexToIA5)
9. Convert the value of a PIXIT from a hex string to ASCII and sent to
the operator.
10.Add an AT command to the test to control the mobile (eg switch off at
the end of the test, send mobile specific AT command)
11.Change the Ciphering Key that is sent via the Control PCO to the
transceiver so that the test will fail
12.Add a second Default test step to accept and respond to DTMF tones.
Use TC 10.1.2.5.1 and a pause when call is set up.
Perfecting Wireless Communications
TTCN 24
AT Commands
AT Command
MMI Command
For the AT command, the message sent from the Controller PC is
AT+CGATT=1<CR>
The expected response is then
OK<LF>
For MMI Commands the message is a text string
! Please check that the DTMF tone indication has been
generated <CR><LF>
The response is always
!OK<LF>
- resulting in TRUE being returned as the result field in the
A_MMI_CmdCnf constraint (the result string is not checked in the
constraint)
Perfecting Wireless Communications
TTCN 25
Reducing the Size of the Test Suite
Select the Test Cases that are to be retained
Find Dependencies will select all of the required
Test Steps, Constraints, Declarations
Extract the selected Identifiers to a new Test
Suite
Save the new (smaller) Test Suite
Often, one only wants to modify and create a small number of test cases.
It is advantageous to remove all of the unwanted Test Cases to reduce
the size of the file so that the build is faster. The editor provides a
facility to also remove all Test Steps, Constraints and Declarations
except those required by the Test Cases that are required.
It is relatively simple to copy any sections of the original test suite to the
new file if additional dependencies are later required.
26
Perfecting Wireless Communications
TTCN
Practical Session - Building the ETS
Perfecting Wireless Communications
TTCN 27
Syntax Check and Build
Add newly created Test Suite
Perform syntax check initially for speed
The new Test Suite is added to the TTCN Manager. Its status will be
new.
The build takes several minutes, so it is advisable to perform the syntax
check first to check for errors in the new test suite.
Perfecting Wireless Communications
TTCN 28
Errors reported when building the ETS
Cross-compilation (Translation) errors
Reported by TTCN compiler
Errors recorded may be linked to the TTCN source
Compilation errors
Reported by the Microsoft compiler but these are very
rare
Linking errors
Reported by the Microsoft Linker
Build an ETS
Then force errors into the .MP file and rebuild the ETS
Translation lexical errors corruption of reserved words
Translation semantic errors non-defined or multiply defined items
Translation syntax errors breaking the TTCN syntax
Compilation errors miss-matching of types
(These are very rare since errors are normally trapped by the translation
process)
Linking functions (TSOs) missing from the
support libraries
Perfecting Wireless Communications
TTCN 29
Finding Complier errors
If errors are reported during the build, one may select Edit TTCN from
the TTCN Compilation Output. This the provides a list of the errors and
allows one to navigate to the line on which the error occurs within the
TTCN.
For convenience, one may save the list of errors as a text file from the
TTCN Compilation Output.
30
Perfecting Wireless Communications
TTCN
Defining and Running the Test Campaign
Perfecting Wireless Communications
TTCN 31
Defining the Test Campaign
Any new PICS/PIXIT parameters will be forced
into the selected parameter file
Any parameter errors are indicated in red
New Test Cases are automatically displayed in
the Campaign Manager.
If tests are disabled via the Selection
Expressions they appear in red and are not run
The values of any new parameters will have to be entered using the
Parameter Editor.
32
Perfecting Wireless Communications
TTCN
The end

You might also like