1. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-129
12. Service Control
12.1. Introduction to Service Control
The Service Control tool is used to compose scripts that automate service
testing – PS as well as CS. Scripting guarantees consistency of
measurements, with tests being executed in a uniform and rigorously
controlled manner. Scripts also allow you to create advanced testing setups
that would be awkward or impossible to manage by operating devices
manually.
The range of application of Service Control scripts is as follows:
• Circuit-switched voice and video calls are supported.
• Data service testing encompasses the following services and protocols:
ABM (available bandwidth measurement), email, FTP, HTTP, MMS, Ping,
SIP, SMS, TCP, Traceroute, UDP, video streaming, VoIP, WAP, and
Weibo. Which of these are testable for particular cellular technologies is
tabulated in section 12.3. With multiple devices activated, multiple data
connections can be maintained concurrently.1
• Scanning can be scripted for all devices indicated in the introduction of
chapter 18.
Special activities are available:
• for recording data collected while executing the scripts. The recordings
will be regular logfiles (extension .trp).
• for applying various control functions to devices, such as RAT lock and
band lock
• for AT commands.
1. Exception: See the Device Configuration Guide, section 12.3 regarding
Ericsson Fixed Wireless Terminals.
2. TEMS Investigation 17.0 User’s Manual
UM-130
12.2. Capabilities of Devices
Apart from technology-related restrictions as noted in section 12.3, phone
devices sold with TEMS Investigation 17.0 (listed in the Device Configuration
Guide, section 2.2.1.1) normally support all types of script activities.
12.3. Supported Services by Cellular Technology
For scanning, there are no technology-related restrictions. What scanning
devices can have their actions scripted is stated in chapter 18 (introduction).
Service/Technology
CS voice calls N/A
CS video calls N/A
ABM
Email
FTP
HTTP
MMS
Ping
SMS1
1. CDMA: Qualcomm chipset based devices only.
TCP
UDP
Video streaming
VoIP
WAP
3. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-131
12.4. The Service Control Designer
The Service Control Designer window is where you compose service
control workflows (scripts):
• The Activity pane is a palette holding all script building blocks: for
running services, for controlling devices, and for execution flow control.
• The Workflow pane is the area where you assemble your script
graphically in the form of a flowchart.
• The Properties pane contains properties of the activity that you are
currently working with (the one currently selected in the Workflow pane).
• In the Configuration Sets pane you define various entities that can be
reused in any script, for example all the details of accessing a particular
FTP server.
In the Properties and Configuration Sets panes, items can either be grouped
into categories or be listed in alphabetical order; use the buttons at the top to
toggle between the two display modes. At the bottom of each pane is a box
showing an explanation for the item currently selected.
4. TEMS Investigation 17.0 User’s Manual
UM-132
The rest of this chapter is organized as follows. First comes a hands-on
tutorial on how to build and run scripts, with numerous screenshots and
examples (sections 12.5–12.15). Next, some additional features of the
Service Control tool are covered (sections 12.16–12.19). Finally, there follows
a reference part cataloging all script activity types with their properties and
associated configuration sets (section 12.20).
12.5. Basics of Creating Scripts (with Voice)
This section covers the fundamentals of creating a complete and valid script
that is ready to be run. For purposes of illustration we will build a very simple
script that dials single voice calls. Video calls are handled in similar fashion.
• Add a voice dial activity to the script. To this end, expand the Voice node
in the Activity pane and drag the Dial item to the empty workflow. (The
cross-reference here, just like others that follow, points to the reference
section 12.20.)
• The Dial box is tagged by an exclamation mark. This means that the
activity is not yet properly configured. A similar exclamation mark in the
Properties pane indicates the property that is undefined: “Configuration”.
5. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-133
• What we need to do is to define a configuration set for the Dial activity.
This is done in the Configuration Sets pane. For a voice dial, the
configuration consists simply of the phone number to call. (In other cases
it can be more complex, as will be seen later.)
• Give the configuration a suitable name, such as one identifying the
subscription having this number. The example below uses a neutral
designation “Voice Call Recipient 1”, for which you will probably want to
substitute something more specific.
• Finish by clicking the Apply button.
• The Properties and Workflow panes are now updated with the
configuration data.
6. TEMS Investigation 17.0 User’s Manual
UM-134
When just dialing a call like this, it will not have a duration. The call will be
established and then immediately hung up (since the script has run to
completion). To give duration to a call, use the Wait activity: compare
section 12.10.5.
• Drag the Wait activity to a position just below the voice dial box. The
graphical user interface helps you position the Wait box correctly by
means of guiding symbols and text.
• Set the duration of the wait in the Properties pane:
• Finally, add a Hang Up activity after the wait.
7. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-135
If you want the script to control both caller and receiver, turn to
section 12.10.4 for guidance.
12.6. Setting Up a Network Connection
This section shows how to set up a network connection, which is a necessary
preparation for running data services.
• Expand the IP node in the Activity pane and add a Network Connect
activity to the script.
• Again you will be notified that a matching configuration is missing:
8. TEMS Investigation 17.0 User’s Manual
UM-136
• A configuration for a data connection is created in the same way as one
for voice, only it contains many more parameters. In particular, you need
to specify what connection mode to use (NDIS, RAS, or Wi-Fi). See
section 12.23.2 for full details.
• Once you have the configuration down, point to it from the Configuration
field in the activity properties. Later on, if you have multiple network
connect configurations defined, you can pick and choose among them.
12.7. Setting Up a Data Service Activity
In this section, we will set up an FTP download as an example of a data
service activity. We will use the data connection configuration created in
section 12.6.
• First add a Network Connect activity. Associate it with the “Test Config 1”
configuration set created in section 12.6.
• Then add a Network Disconnect activity at the bottom of the workflow.
The disconnect operation will take down the network connection. This
activity needs no particular configuration, so you do not need to associate
it with a configuration set.
9. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-137
• The FTP session itself is handled by the FTP Download activity. Insert an
activity of this type between network connect and disconnect:
• For the FTP Download activity, you need to create a configuration set
representing the FTP server and how to access it. Again this is done in
similar fashion as for previously created configurations.
10. TEMS Investigation 17.0 User’s Manual
UM-138
• After completing the definition of the FTP server configuration, reference it
from the FTP Download activity in the same manner as before.
12.8. Stand-alone PS Attach and Detach
In this section we will perform explicit PS attach and detach operations in
isolation. One reason for doing this could be to measure the time taken by
these operations, particularly for the purpose of computing KPIs. We will
reuse the configuration sets and activities from sections 12.6 and 12.7.
• We begin with the FTP download workflow from section 12.7.
• At the start of this workflow, add a PS Detach and a PS Attach activity, in
that order (they are found in the IP category). This will detach the device
from the PS network and then reattach the device.
11. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-139
See also section 12.9.
12.9. Snippets
A snippet is a fixed sequence of activities that is defined as a building block
and can be reused as such, saving time and effort when creating new scripts.
Predefined snippets for all supported services are provided in the Activity
pane. For an example of such a predefined snippet in use, see
section 12.10.4.
The predefined snippets are also tailored to produce all data required to
compute KPIs. (The KPI computation itself is done in TEMS Discovery
Device.) Compare chapter 39.
You can also save an arbitrary activity sequence as a user-defined snippet:
• Select all of the activities by dragging the mouse pointer, then enter the
File menu and select Save as Snippet. You are prompted to name and
describe the snippet.
12.10. Workflow Control Structures
The Control Flow node in the Activity pane contains a number of logical
constructs and timers for controlling the script execution flow.
12. TEMS Investigation 17.0 User’s Manual
UM-140
12.10.1. Sequences
You can formally define a group of activities in a script as a sequence. This is
handy if you want to apply some operation to all of these activities – for
example, to enable or disable them.
• Suppose your script includes PS detach followed by PS attach as
described in section 12.8. Suppose further that you want a convenient
means of turning the detach/attach activities on and off. You can then
encapsulate the PS Detach and PS Attach activities within a sequence.
• Expand the Control Flow node and from it drag a Sequence activity to a
position immediately above the PS Detach activity:
• Select the PS Detach and PS Attach activities by holding Ctrl and clicking
each activity, then drag them both (using the PS Detach box as handle)
into the sequenceActivity1 box. You can now enable and disable the
detach–attach sequence as a whole:
13. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-141
Compare section 12.15.5. For full details on the Sequence activity, see
section 12.22.5.
12.10.2. If–Else Constructs
An if–else construct is used to split the execution flow into several branches
based on the outcome of a previous activity.
Here is an example. Suppose the device is on a WCDMA network and is
instructed to do an FTP download. Now if the device is handed over to GSM,
so that the throughput is sharply reduced, then we want to abandon the
download, i.e. the activity should terminate. (This is accomplished by
imposing a “terminate on event” condition on the activity; see section 12.12.)
After a handover to GSM has occurred, we want to proceed with a voice call
(which does not require a large bandwidth). If on the other hand the device
remains on WCDMA, then after the FTP download has completed we want to
continue with a video streaming session.
To this end we use an if–else construct in the following manner:
• First add a Network Connect activity, and then an FTP Download activity
with the Abort property set to On Event and “Handover from UTRAN”
selected as event type:
• Then add an If–Else activity below the FTP download:
– For the left-hand branch (“ifElseBranchActivity1”), set Condition Type
to Activity Result, and set the associated attributes as follows: Activity
= the name of the FTP download activity, by default
“ftpDownloadActivity1”, Operator = Equals, Result = Stopped by
Event. See next screenshot.
– For the right-hand branch (“ifElseBranchActivity2”), set Condition
Type to Any. This always evaluates to true, so that the right-hand
branch will be executed whenever the condition in the left-hand
branch is false. (Not shown in the screenshot below.)
14. TEMS Investigation 17.0 User’s Manual
UM-142
• Add a voice dial activity on the left (to the node “sequenceActivity1”) and a
streaming activity on the right (to the node “sequenceActivity2”), as
described in the introduction of this subsection. This is done just as in
sections 12.5 and 12.7 and is not detailed here.
See section 12.22.1 for full details on the If–Else activity.
12.10.3. While Loops
While loops are used to repeat a sequence of activities a predetermined
number of times.
• Suppose we want to execute an FTP download five times over.
• Begin by dragging While activity to the start of the workflow. (Just as with
sequences – compare section 12.10.1 –, you first add the empty While
construct to the workflow, then fill it with the desired contents.)
• In the Properties pane, set the number of times you want to iterate the
while loop. Below, by entering the value 5, we stipulate that the loop
should be run five times in total.
15. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-143
• Now drag the predefined FTP download snippet into the while loop,
dropping it onto “sequenceActivity1” in the indicated spot (“Drop
Activities Here”):
• It may be desirable to insert a brief pause after each pass through the
while loop. You can accomplish this by appending a Wait activity at the
end of the FTP snippet:
16. TEMS Investigation 17.0 User’s Manual
UM-144
• Set the duration of the wait in the Properties pane:
For example, if you set Duration to 10 s, the script will perform five FTP
downloads in succession with a 10 s idle interval between downloads.
See section 12.22.2 for full details on the While activity.
12.10.4. Parallel Activities
All scripts so far have been written for a single device engaged in one activity
at a time. However, a script can also control the activities of multiple devices,
or assign multiple parallel activities to the same device.
12.10.4.1. Example 1: CS Voice/Video – Caller and Receiver
For example, if one phone is to place a voice or video call to another, caller
and receiver must be put in parallel, one dialing and the other answering. To
create a branching structure for these concurrent tasks, we use the Parallel
activity from the Control Flow category. See the screenshot below, where
EQ1 calls EQ2:
17. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-145
A parallel structure is also recommended for MMS send/receive.
12.10.4.2. Example 2: Concurrent Activities on Different
Devices
Next is a slightly more complicated example. Suppose that we want to control
three UEs in parallel, one performing downloads over FTP and the other two
looping short voice calls. For this purpose we need to build a somewhat more
complicated workflow, as detailed in this section.
• First add a While activity and set it to run 10 times. This will become an
outer loop repeating the various activities that will be included in it.
18. TEMS Investigation 17.0 User’s Manual
UM-146
• Remove “sequenceActivity1” by selecting it and pressing Delete. (The
Sequence activity is created automatically, but in this case we do not
need it at the topmost level – compare the steps that follow.)
• Drop a Parallel activity inside the while loop.
• Since the Parallel construct by default provides only two branches, we
need to add one more. To this end, right-click the “parallelActivity1” box
and choose Add Branch from the context menu. The structure is now
expanded with a third branch:
19. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-147
It is now time to define the service-related activities. Let us begin with the
voice calls:
• Add while loops to branches 2 and 3 and set each to execute 5 times.
• Add a voice call snippet (a predefined one is found in the Activity pane)
to each while loop. Set the wait time to 10 seconds.
• To assign the activities to the correct devices, we need to change the
equipment (EQ) parameter to EQ2 and EQ3 in branch 2 and branch 3
respectively. This is done in the Properties pane or from the context
menu for each activity.
After these steps, branches 2 and 3 of the workflow should have the following
structure:
20. TEMS Investigation 17.0 User’s Manual
UM-148
• Next, define the FTP task for device no. 1. All you need to do here is to
add an FTP download snippet to branch 1 and associate it with a
functional configuration.
In the screenshot that follows, the voice sequences have been collapsed to
clarify the overall structure of the workflow.
21. Chapter 12. Service Control
NT15-42086 ver 1.0 UM-149
This script will conduct a total of 10 FTP downloads and 2 × 5 × 10 = 100
voice calls.
See section 12.22.3 for full details on the Parallel activity.
Note: When composing a script for multiple concurrent data service
sessions using multiple devices, it is wise to make sure that these
sessions are not all initiated simultaneously. It is better to let the
sessions start one at a time, allowing at least a few seconds
between successive initiations. Insert Wait activities as appro-
priate to achieve this. (No such Waits are present in the above
example, which contains only one data service session.)