0% found this document useful (0 votes)
36 views

Scripting - Service Control

The document discusses how to use the Service Control tool to create scripts that automate service testing on devices. It provides examples of creating simple scripts to make voice calls, set up network connections, and perform FTP downloads. It also covers adding workflow control structures, snippets, and parallel activities. The goal is to demonstrate the basics of building scripts to consistently test services in an automated manner.

Uploaded by

mickyalemu1966
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Scripting - Service Control

The document discusses how to use the Service Control tool to create scripts that automate service testing on devices. It provides examples of creating simple scripts to make voice calls, set up network connections, and perform FTP downloads. It also covers adding workflow control structures, snippets, and parallel activities. The goal is to demonstrate the basics of building scripts to consistently test services in an automated manner.

Uploaded by

mickyalemu1966
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

52.

Service Control

52.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: Email, FTP, HTTP, MMS,
Ping, SIP, SMS, TCP, Traceroute, UDP, video streaming, VoIP, and WAP. Which of these are
testable for particular cellular technologies is tabulated in section "Supported Services by Cellular
Technology". With multiple devices activated, multiple data connections can be maintained
concurrently.

Scanning can be scripted for all devices indicated in the introduction of chapter "Scanning: General".

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.

executing Python (.py) scripts.

52.2 The Service Control Script Designer

The Service Control Script Designer window is where you compose service control workflows
(scripts) and available in a window in TEMS Investigation but also as a standalone
application, Service Control Script Designer, accessable from Windows Start Menu:
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.

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 "Basics of Creating
Scripts (with Voice)"–"Running Scripts"). Next, some additional features of the Service Control
tool are covered (sections "General Activity Properties"–"Further Functionality in the Service
Control Designer Window"). Finally, there follows a reference part cataloging all script activity
types with their properties and associated configuration sets (sections "Activities: Reference
Sections"–"Voice Activities").

52.3 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 sections "Activities: Reference Sections"–"Voice Activities".)

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".
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.
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 "Wait".

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.


If you want the script to control both caller and receiver, turn to section "Parallel Activities" for
guidance.

52.4 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:


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 "Network Connect" 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.

52.5 Setting Up a Data Service Activity

In this section, we will set up an FTP download as an example of a dat a service activity. We
will use the data connection configuration created in section "Setting Up a Network
Connection".
First add a "Network Connect" activity. Associate it with the "Test Config 1" configuration set created in
section "Setting Up a Network Connection".

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.

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.
After completing the definition of the FTP server configuration, reference it from the FTP Download
activity in the same manner as before.

52.6 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 an d activities from
sections "Setting Up a Network Connection" and "Setting Up a Data Service Activity".

We begin with the FTP download workflow from section "Setting Up a Data Service Activity".

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.
See also section "Snippets".

52.7 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 "Parallel Activities".

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 c hapter "Key Performance
Indicators – KPIs".
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.

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

52.8.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 "Stand-alone PS
Attach and Detach". 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:
Compare section "Suppressing Parts of a Script". For full details on the Sequence activity, see
section "Sequence".

52.8.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 ov er 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 "Activity
Properties That Control Execution".) After a handover to GSM has occurred, we want to
proceed with a voice call (which does not r equire 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.)

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 "Basics of Creating Scripts (with Voice)" and "Setting Up a Data Service
Activity" and is not detailed here.

See section "If–Else" for full details on the If–Else activity.

52.8.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 "Sequences" –, 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.

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:
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 "While" for full details on the While activity.

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

52.8.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, c aller 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:
A parallel structure is also recommended for MMS send/receive.

52.8.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.
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:
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:
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 make the overall
structure of the workflow clearer.
This script will conduct a total of 10 FTP downloads and 2x5x10 = 100 voice calls.

See section "Parallel" 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
appropriate to achieve this. (No such Waits are present
in the above example, which contains only one data
service session.)

52.8.4.3. Example 3: Concurrent Activities on the Same Device


The Parallel structure can also be used to run multiple activities concurrently on the same
device, even multiple activities of the same type, provided that the device supports it. The
activities concerned are those for FTP download/upload, HTTP, email, and Ping.
The script shown below lets one device perform two concurrent FTP downloads. All instances
of the FTP Download activity use the same configuration set; however, to prevent file write
conflicts, each activity adds a unique prefix to the target file name (refer to section "FTP
Download" for details).

When assigning multiple scanning activities to the same device, it is best not to start all of the
scans at the exact same time. Insert short waits as appropriate to stagger the start times, as
exemplified in the following screenshot (branch 1: no Wait; branch 2: Wait with duration 2 s;
branch 3: Wait with duration 4 s). Compare the similar advice in section "Example 2:
Concurrent Activities on Different Devices".
52.8.5 Wait
The "Wait" activity basically does nothing, and it temporarily halts the execution of the
workflow branch it is located in – for all devices, not just the device the Wait is assigned to.
After the wait time has expired, the execution proceeds to the next activity.

When following a (voice) Dial, Video Dial, or Start ... Scan activity, the Wait has the apparent
effect of giving duration to that activity, and this construction is the most convenient method of
controlling the duration. The Wait activity also comes in useful whenever some tasks need to
be cleanly separated in time for one reason or other.

For some usage examples, see sections "Basics of Creating Scripts (with Voice)" , "While
Loops", "Example 2: Concurrent Activities on Different Devices" , and "Notes on Script-
controlled Logfile Recording".

See section "Wait" for full details on this activity.

52.8.6 Wait For


The "Wait For" activity can be used to:

Wait for a scheduled point in time. The schedule can be set up in a number of ways. See
section "Waiting For a Scheduled Point in Time" below.
Wait for another activity to finish with a predetermined outcome. See section "Waiting For a Given
Outcome of an Activity1".

Wait for a particular kind of event to occur. This is straightforward; see the reference section "Wait
For" for the fine points. A special case is Wait For with periodic events: see section "Wait For with
Periodic Events".

52.8.6.1. Waiting For a Scheduled Point in Time


Suppose we want a device to dial a short voice call once every 10 minutes. This can be
accomplished by putting the voice call inside a while loop which also contains a Wait For
activity, providing a timing mechanism.

Create a "While" loop and set its termination condition to whatever you like.

At the top of the loop, put a "Wait For" with Trigger = Schedule.

If you just want to start the dialing as soon as the script starts, set Start to Immediately.

You can also specify that the calls should begin, for example, at the turn of the hour ("On the
Hour") or at an arbitrary time ("Time of Day").

To make the loop execute with the desired frequency, continue by setting Repeat to Yes and Repeat
Interval to 10 minutes. The loop will then pause at the Wait For activity each time until 10 minutes
have passed since the previous turn. This pattern will repeat until the while loop terminates.

Add activities for the voice call ("Dial", "Wait", "Hang Up") just as in section "Basics of Creating Scripts
(with Voice)". In the screenshots below, the call duration has been set to 2 minutes.
Left: While loop controlled by "Wait For" with Start = Immediately.
Right: While loop controlled by "Wait For" with Start = Time of Day.

52.8.6.2. Waiting For a Given Outcome of an Activity1


Instead of collecting data continuously, an alternative ("event -driven") approach to data
collection is to wait until something interesting happens and trigger recording only then.

Again taking CS voice as a simple use case, suppose that the voice service is tested by dialing
one call after another. If a call proceeds normally, we do not log any data, but if a call is
blocked, we want to start a logfile recording to capture what happens over the following one -
minute period.

Insert a "While" loop repeating voice calls.

Create a "Parallel" structure with two branches.


In the left-hand branch, configure the "Dial" activity to abort if the call is blocked (Abort property set
to On Event with "Blocked Call" selected as trigger).

In the right-hand branch, put a "Wait For" activity at the top monitoring the voice calls. Set
the Trigger property to Activity Result and stipulate that it should equal "Stopped by Event". Then
add activities for logfile recording beneath the Wait For: "Start Recording" followed by a "Wait" with
Duration = 1 min and finally "Stop Recording".

If any call failures are of interest, and not only blocks, then set Activity Result to the catch-all
value "Failed" instead. Recording will then be triggered by any voice call that does not
complete normally.

Note: If the Wait For activity is placed inside a While loop, the activity that it is waiting for must
be placed inside the same loop.

52.8.6.3. Wait For with Periodic Events


Suppose we want to perform some kind of task whenever a given condition is satisfied.

We can then construct a user-defined event for the condition and make that event periodic,
which means that it is generated repeatedly at fixed intervals as long as the condition is true
(see section "Setting Up a User-defined Event").
Next, a script is written containing a while loop, at the start of which a "Wait For" activity listens
for the periodic event. The rest of the loop contai ns the task to be performed.

If and when the periodic event is generated, the execution will proceed through the rest of the
while loop, so that the device performs its task once. Then the execution returns to the Wait
For and waits for the event to be generated again, etc.

Note that user-defined events are prefixed with the string "User Defined:" in the Events drop-
down box. See the image below.

Left: While loop with "Wait For" having event as trigger.


Right: Selection of periodic event as "Wait For" trigger.2

52.8.7 Run Script


The "Run Script" activity is a reference to another script and consists in executing the whole of
that script at the given point in the workflow. Using Run Script can be regarded as an
alternative to saving and reusing snippets (see section "Snippets"), and it may be preferable if
you want to organize your scripts in modular fashion, keeping do wn the complexity of each
individual script.
52.8.8 Terminate
The "Terminate" activity simply kills the whole script immediately and unconditionally. One
possible application of this activity is to combine it with "Wait For" to stop a script at a fixed
time of day. The Wait For should then have Trigger = Schedule and Start = "Time of Day". For
example, suppose the script contains a while loop; the sequence depicted below might then be
inserted in the while loop to stop execution at 3 p.m.

52.9 Editing Workflows and Script Settings

You can move activities around in the workflow by clicking and dragging.

You can also edit workflows using the Cut, Copy, and Paste commands found in
the Edit menu of the Service Control Designer window. The same operations can be performed
from the window toolbar or from the context menu that appears when right -clicking a workflow
item. The editing commands work in standard Windows fa shion.

A few points merit special comment:

You can select multiple activities to move, cut, or copy by holding Ctrl and clicking. The activities do not
have to be adjacent in the workflow but can be picked arbitrarily.

If you are selecting a number of consecutive activities and wish to preserve their ordering after they are
moved or pasted, Ctrl-click the activities from top to bottom in the same order as they come in the
workflow.

When dragging a selection to a new position in the sequence, use the topmost activity as handle to
preserve the ordering of activities. (Whatever activity you use as handle will end up on top.)

The destination of a pasted item depends on what, if anything, is currently selected in the workflow:

Item(s) Selected in Workflow Paste Destination

None Bottom of workflow


Item(s) Selected in Workflow Paste Destination

One or more arrows, no activity Above arrow first


selected

One or more activities1 Below activity first


selected

"Sequence" activity Bottom of sequence

"If–Else", "While", – (cannot paste)


or "Parallel" activity

52.10 Activity Properties That Control Execution

All activities have some general properties governing their execution:

If an activity fails, you can choose to skip that activity, retry the activity, or terminate the entire script (On
Failure property).

You can have an activity aborted after a fixed length of time, or if a specific event occurs
(Abort property).

For full details, see section "Failure Handling Section".

52.11 Parameter Substitution

Use a preset parameter substitution configuration file to change settings in a script. These settings can be
used with parameter substitution:

• StartRecording
o Prefix
o Subject
o Description
o Tags
o Directory
• Http GET/POST
o URL
• FTP UL/DL
o ServerAddress
• Ping
o RemoteAddress
• Streaming
o Streaming URL
52.11.1 Configuration File

All substitutions are entered into a configuration file located in the TEMS Product Files folder:
%userprofile%\Documents\TEMS Product Files\TEMS
Investigation 25.1\Settings\ParameterSubstitution.txt

52.11.2 File format

%ParameterName%=Substituted value
e.g.
%RecordingPath%=C:\logfiles

Parameters can be nested, for example, the following is supported:


%MyRootFolder%=c:\test
%SomeSubFolder%=MySubFolder
%FullPath%=%MyRootFolder%\%SomeSubFolder%
For this example, the FullPath parameter would resolve to c:\test\MySubFolder.

Directory Parameters can be part of a full expression:


Entered in the configuration file: %MachineName%=NUC1
Entered in the Script Designer: C:\!!MachineName!!\Logfiles
Gives the result: C:\NUC1\Logfiles

The purpose of this feature is to have separate sets of ParameterSubstitution.txt on separate machines,
which could then execute the same script without any changes, but still get their logfiles with a machine
specific Prefix, or their HTTP Get to different URL's etc.

52.11.3 The Parameter Editor

The Script Designer offers a chance to inspect values directly while creating the script. Open the
Parameter Selection dialog by clicking the three dots in the editor.

To Add, Modify, or Remove substitution parameters in the list, click on the Open button.
This opens the ParameterSubtituion.txt file (located in the TEMS Product Files folder stored in the
computers Documents folder) in a text editor where changes can be made and saved.

Once finished, return to the “Parameter Selection” dialog and press the Reload button. Your changes will
be visible in the list.

Note: The editor can only be used to inspect given values, all changes must be made in the configuration
file.
52.12 UE Control Functionality

A number of control functions accessible from the Navigator (Equipment tab, bottom
part, Activities tab: see section "Control Functions") can also be applied in a script in the form
of activities.

For the RAT lock and band lock functions, it must be noted that the script activities are
inevitably more generic in nature than the manual control functions, since when compos ing a
script it is not known what devices the activities will apply to. Therefore, the Band Lock activity
has bands from every supported technology selectable, whereas the manual band lock function
in the Navigator (acting as it does on a specific device o f a well-defined make and model) can
only lock on the bands supported by the device. In conclusion, a UE control activity in a script
can be executed only if the target device is capable of the operation in question. You will be
notified if this is not the case (see section "Validating Scripts" on validation).
The same applies to the "Channel Lock" script activity as compared to the manually applied
Cell Lock control function.

See section "Activate" for full details on the UE control activities.

52.13 Validating Scripts

Before a script is run, it needs to be validated to ensure that it is syntactically correct and does
not assign tasks that your devices do not support. For uncomplicated scripts like our first
example in section "Basics of Creating Scripts (with Voice)" , this may seem trivial. However,
when building more complex scripts involving multiple devices and control logic, the validation
becomes a non-trivial issue. Validation is also crucial for UE control functionality (see
section "UE Control Functionality").

A script is automatically validated when you start it. You can also explicitly have a script
validated in advance:

Enter the Script menu and choose Validate. You will be presented with the results.

If the script passes validation, you will receive a notification "Script validation succeeded". The script is
then ready to be run. See section "Running Scripts".

52.14 Running Scripts

You can run a script either from the Service Control Monitoror from the Service Control
Designer.

52.14.1 General Aspects of Script Execution

The devices involved in a script will execute their assigned activities independently of one another,
except when the devices engage in a service where they interact, and when devices are involved in
different workflow branches that converge. In the latter case, all branches are synchronized before
the execution proceeds past the point of convergence.

How to run only parts of a script is described in section "Suppressing Parts of a Script".

It is possible in the application to run several scripts at the same time; however, this
is not recommended. (The script validation does not extend to such usage.)

When executing a script, the keylock function must not be activated in any of the participating devices. If
it is, the script will not work properly.

If you stop a script while an SMS or MMS message is being transferred, you should wait until the
receiving device has received the message before restarting the script. Otherwise, unpredictable
behavior may result.
52.14.2 Running a Script from the Service Control Monitor
Click the Open Script button and select your script (file
extension .tsc).

52.14.3
Click the Run Script button to start the script.

52.14.4
Click the Stop Script button to stop script execution.

52.14.4.1. Monitoring Script Execution Status


On the Status tab of the Service Control Monit or, the current status for each script activity is
displayed.

For Wait activities, the Comment string (if defined) is displayed in italics here, helping to distinguish Waits
from each other if the script contains several:

52.14.4.2. Viewing Statistics on Script Execution


On the Summary tab of the Service Control Monitor, statistics are given on the outcome of
each activity type (number of succeeded, aborted, and failed activities). Clicking an underlined
number in this table brings up a summary of each activity that has been run.

Below is an example (UDP with full duplex tested):


52.14.5 Running a Script from the Service Control Designer

Enter the Script menu and choose Run.

The tab holding the usual contents of the window is now hidden and replaced
by Status and Summary tabs which are identical with those in the Service Control Monitor
(see section "Running a Script from the Service Control Monitor" ).

Click the Stop Script button to stop script execution.


Click the Return to Designer button to return to the Service
Control Designer window.

52.14.6 Suppressing Parts of a Script


It may happen that you want to run only certain parts of a script and exclude others. You can
easily disable any individual activity by right -clicking it or by changing the Enabled flag in the
Properties pane, as shown below.
An activity that is currently disabled appears dimmed in the workflow pane. For example,
suppose we want to skip the initial detach/attach procedure. After disabling the sequence
comprising the first two activities, the flowchart looks like this:
Note: Be sure not to disable an activity that another activity is
dependent on. For example, do not suppress an activity
whose outcome is used to evaluate a subsequent "If–
Else" condition (see section "If–Else Constructs").

To re-enable a disabled activity, just set the Enable property to True again.

52.14.7 Presentation of Data Service Testing


See section "Presentation of Data Service Testing" .

52.15 General Activity Properties

These properties are common to all or many activity types.

Activity-specific properties are covered in sections "Activities: Reference Sections"–"Voice


Activities" in connection with their respective activities.

52.15.1 Activity Section

Name: Name given to the activity. (Only appears for certain non-editable activities such as the "root"
activity at the bottom of the workflow.)

Configuration: Reference to a configuration set of the type associated with this activity. For example,
for "FTP Download", an FTP server configuration set needs to be selected here. The combo box is
populated with all existing configuration sets that fit the activity; if no such configuration set exists,
you need to create one in the Configuration Sets pane.

Equipment: The EQ to which the activity is assigned.

Enabled: True or False. If set to False, the activity is disabled and will not be performed when the script
is run. This is indicated by the activity being dimmed by a semi-transparent greenish box in the
flowchart.

52.15.2 Failure Handling Section

Abort: This property determines under what conditions the activity will be aborted.

Disabled: The activity will execute as long as it takes to complete.

On Timeout: The activity will be aborted after a fixed period of time, unless it has already
completed before that time. What you indicate here is thus a maximum duration for the activity.

On Event: The activity will be aborted if and when one of the specified events occurs; otherwise it
will run to completion.
On Timeout and/or Event: Select this to create a more complex abort condition in the form of a
boolean expression combining On Timeout and On Event criteria as defined above. Additional
fields Condition 1, Operator (AND/OR), and Condition 2 appear for defining the boolean
expression, which can be expanded recursively.

Note that this property is also possessed by the root activity, in which case it applies to the entire script.

Compare the "Terminate" activity, which aborts the whole script with immediate effect.

On Failure: This property determines what will happen if an activity fails (when first attempted).

Stop Script Execution: If an activity fails, the activity is abandoned, and the whole script is
terminated.

Continue Script Execution: If an activity fails, the activity is abandoned, and the execution
proceeds to the next activity in the workflow branch in question.

Retry: If an activity fails, it will be retried. When you choose this option, a set of further parameters
appear: Retries – the number of retries; Delay – the time to wait before each retry; On
Failure – what action to take if all retries fail (continue or stop script).

52.16 Configuration Sets

52.16.1 Descriptions of Configuration Sets


All types of configuration set are associated with a particular service. For that reason, each
configuration set is described in sections "Activities: Reference Sections"–"Voice Activities" in
conjunction with the activity or activities that use it

52.16.2 Working with Configuration Sets in the Service Control Designer


Within the Service Control Designer itself, you can perform operations on configuration sets as
follows.
New: Creates a new configuration set with default settings. It is named according to the format "New
Configuration #<n>".

Copy: Creates a duplicate of the currently displayed configuration set under a new name "New
Configuration #<n>". This is handy if you want to make some minor changes to an existing
configuration.

Rename: Selects the configuration set name in the combo box so that you can type a new name for it.

Delete: Deletes the currently displayed configuration set.

When you click the Apply button at the bottom of the Configuration Sets pane, the
configuration set with the currently displayed name and settings is saved automatically.

52.16.3 Managing Configuration Sets from the Settings Manager


You can manage configuration sets using the Settings Manager utility. For a tutorial on how to
use these functions in conjunction with script saving/loading in order to port scripts between
PCs, see section "Saving and Loading Scripts".

To launch the Settings Manager utility, choose File > Manage Settings.

Alternatively, in Windows, choose Start > All Programs/All apps > TEMS
Investigation 25 > Service Settings.

This window appears:


52.16.3.1. Exporting Configuration Sets
To export configuration sets you use the Export tab. All configuration sets currently known to
the application are listed in the window.

Select the configuration sets you want to export by clicking them in the list. Shift + click and Ctrl + click
can also be used, in standard Windows fashion. To select/deselect all sets, right-click in the list and
choose Select All/Unselect All.

Now select where to export the configuration sets. Click the Target button and point to the desired
directory.

To perform the export, click the Export button. Each configuration set is now exported as a file named
according to the format TEMS.Services.Settings.<service name>Settings.<...>.config.

Any user names and passwords (e.g. for FTP or HTTP servers) contained in configuration sets
are encrypted in the *.config file. Be aware that anyone making use of the configuration set will
be accessing servers with the same credentials.

52.16.3.2. Importing Configuration Sets


To import previously exported configuration sets, you use the Import tab.

Click the Source button and browse to the directory you want to import from. The window is populated
with all configuration sets found in that directory.

Select the configuration sets you want to import by clicking them in the list. Shift + click and Ctrl + click
can also be used. To select/unselect all sets, right-click in the list and choose Select All/Unselect
All.

To perform the import, click the Import button.

Please note that it is not possible to import obsolete configuration sets from older TEMS
Investigation versions, for example:

Configuration sets for the VoIP Dial, VoIP Answer, and VoIP Hangup activities found in TEMS
Investigation 14.x.

Configuration sets for scanning from TEMS Investigation 14.0 or older versions.

52.16.3.3. Deleting Configuration Sets


You can delete a configuration set from TEMS Investigation by selecting it on the Export tab
and clicking the Delete button.

From the Tools menu you can delete all configuration sets by choosing Clear Settings.
If the Enable Backup option is selected, a backup of the configuration sets will be created
whenever you use the Clear Settings command.

To restore configuration sets from a backup, choose Tools > Manage Backups, select the backup of
interest from the list, and click the Restore button.

To delete a backup, select it and click Clear.

52.17 Saving and Loading Scripts

52.17.1 Saving a Script to File


To save a script to file, click the Save button on the Service
Control Designer toolbar.
The file will receive the extension .tsc (for "TEMS Service Control").

The Save Script dialog contains the following options:

Description: Free-text field where you can optionally enter a description of the script.

Format: You can save the script either with or without the configuration sets it uses. Note that
configuration sets can also be saved separately: see section "Managing Configuration Sets from the
Settings Manager".

Standard: No configuration sets are saved with the script. This means that changes to a
configuration set will automatically propagate to all scripts that reference it. Choose this option if
you are going to use the script on one PC only. (This is the default setting.)

Redistributable: All configuration sets referenced in a script are saved with the script, making the
TSC file a self-contained and independent entity that can be immediately reused on a different
PC. Choose this option if you are going to use the script on several PCs.
To open an existing script stored on file, click the Load button on
the Service Control Designer toolbar.

52.17.1.1. Tutorial on Porting Scripts between PCs


Follow these steps to share a script and its related configuration sets between two computers:

On the "sender" PC:

Save your workspace.

Save your script with Format set to Redistributable.

Export your configuration sets.

On the "receiver" PC (with the above data from the sender available on some suitable storage medium):

Import the configuration sets exported from the sender.

Start TEMS Investigation.

Open the sender's workspace.

Open the sender's script. The script can now be not only run but also freely modified on the
receiver PC.

52.17.2 Saving a Workflow as an Image

You can also save the contents of the workflow pane as an image. To this end, choose File > Save As
Image in the Service Control window and select the desired image file format.

52.18 Further Functionality in the Service Control Designer


Window

52.18.1 Activity Filter


The Activity Filter combo box at the top of the Activity pane can be used to filter the list of
activities so that it shows only the activity types supported by a particular device. By default all
activities are shown ("All").
The Refresh button to the right of the Activity Filter combo box
updates the activity list with any new user-defined snippets that
have been created since the list was last refreshed.

52.18.2 Context Menu in Workflow Pane


The context menu that appears when you rig ht-click in the workflow pane has functionality that
is mostly mirrored in other places: in the regular window menu and in the Properties pane. The
rest is standard Windows functionality, except the Move Left and Move Right commands
which you can use to change the ordering of activities in a workflow.

The context menu is especially useful for changing properties (EQ assignment, on -failure
behavior) of several activities at once. This is most conveniently done from the context menu:

Select all of the activities you want to modify by dragging the mouse pointer or by Ctrl + click, then right-
click the selection and choose the desired command from the context menu.

52.18.3 Zooming the Workflow Pane


In the workflow pane, the mouse pointer by default has the usual point -and-click function. You
can however switch the mouse to zoom mode, where mouse pointing actions have the effect of
zooming the workflow pane in or out.

After you click the Zoom In button on the window toolbar, mouse
clicks in the workflow pane will magnify its contents in predefined
steps. You can also click and drag to select a portion of the
workflow pane that you want to enlarge.
To reverse the mouse-click zoom function, click the Zoom
Out button on the window toolbar.
To return the mouse to pointing mode, click the Pointer button.

52.19 Activities: Reference Sections

The sections that follow give full detail on all activities, explaining all activity -specific
properties found in the Properties pane: that is, those not covered in section "General Activity
Properties". Not all activities have unique properties.

Control activities: section "Activate"

Control Flow activities: section "Control Flow Activities"

IP activities: section "IP Activities"

Messaging activities: section "Messaging Activities"

Scan activities: section "Scan Activities"


Social Networking activities: section "Social Networking Activities"

Video activities: section "Video Activities"

Voice activities: section "Voice Activities"

52.20 Control Activities

52.20.1 Activate
Activates the device so that it can be used in TEMS Investigation.

This has the same effect as manual device activation, described in section "Activating and
Deactivating External Equipment in TEMS Investigation" .

This activity has no unique properties.

52.20.2 ADB
Sends an Android Debug Bridge command.

ADB Timeout property: Time ("hh:mm:ss") to wait for an ADB response from the device.

ADB Command property: ADB command string with the serial number argument (-s <serial number>)
omitted. Define a configuration for each ADB command you want to send.

You might also like