0% found this document useful (0 votes)
19 views88 pages

HIT 2.x User's Guide Overview

The HIT 2.x User's Guide provides comprehensive instructions for the usage, operation, and configuration of the HIT system, which is primarily used for integration testing. It includes details on system requirements, installation instructions, and various functionalities such as case lists, menus, and toolbar icons. The document emphasizes the importance of having the HIT application open while referencing the guide for effective use.

Uploaded by

Gabriel Paz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views88 pages

HIT 2.x User's Guide Overview

The HIT 2.x User's Guide provides comprehensive instructions for the usage, operation, and configuration of the HIT system, which is primarily used for integration testing. It includes details on system requirements, installation instructions, and various functionalities such as case lists, menus, and toolbar icons. The document emphasizes the importance of having the HIT application open while referencing the guide for effective use.

Uploaded by

Gabriel Paz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HIT 2.

x
User's Guide
HIT User's Guide

DISCLAIMER

Copyright © Nokia Siemens Networks 2008. All rights reserved.


No part of this publication may be copied, distributed, transmitted,
transcribed, stored in a retrieval system, or translated into any human or computer
language without the prior written permission of Nokia Siemens Networks.

The manufacturer has made every effort to ensure that the instructions contained in the
documents are adequate and free of errors and omissions. The manufacturer will, if necessary,
explain issues which may not be covered by the documents. The manufacturer's liability for
any errors in the documents is limited to the correction of errors
and the aforementioned advisory services.

The documents have been prepared to be used by professional and properly trained personnel, and
the customer assumes full responsibility when using them. The manufacturer welcomes customer
comments as part of the process of continual development and improvement of the documentation
in the best way possible from the user's viewpoint.
Please submit your comments to the nearest Nokia Siemens Networks sales representative.

NOKIA is registered trademarks of Nokia Corporation.

Issue Date Page (Pages)


1.19-0 2/4/2008 2 (88)
HIT User's Guide

CONTENTS

1. INTRODUCTION ....................................................................................................................................................... 6
1.1 DOCUMENTATION .................................................................................................................................................. 6
1.2 SYSTEM REQUIREMENTS ........................................................................................................................................ 6
1.3 INSTALLATION INSTRUCTIONS ................................................................................................................................ 6
2. SYSTEM CONFIGURATION .................................................................................................................................... 8
2.1 DESKTOP ............................................................................................................................................................... 8
2.2 TOOLBAR ICONS ............................................................................................................................................... 9
2.3 [Link] FILE ..................................................................................................................................................... 10
2.4 USER DEFINED PROMPT STRINGS .......................................................................................................................... 14
2.5 TROUBLESHOOTING.............................................................................................................................................. 15
3. HIT WINDOWS ........................................................................................................................................................ 18
3.1 HIT EDITOR ......................................................................................................................................................... 18
3.2 MACRO WINDOW ................................................................................................................................................. 19
3.3 LIST WINDOW (CASE LIST).................................................................................................................................... 20
3.4 BATCH QUEUE WINDOW ...................................................................................................................................... 20
3.5 MESSAGE WINDOW .............................................................................................................................................. 21
3.6 RESPONSE WINDOW ............................................................................................................................................. 21
3.7 TERMINAL WINDOW............................................................................................................................................. 21
3.8 SUMMARY OF WINDOW EDITING CAPABILITIES ..................................................................................................... 23
4. CASE LISTS.............................................................................................................................................................. 24
4.1 CASE LIST SYNTAX .............................................................................................................................................. 24
4.2 #OPTIONS DIRECTIVE ........................................................................................................................................... 25
4.3 E CLASS CASES .................................................................................................................................................... 27
4.4 P CLASS CASES .................................................................................................................................................... 27
4.5 .TMP FILES ......................................................................................................................................................... 28
4.6 CASE LIST RESTRICTIONS - LIVE SWITCH WARNING ....................................................................................... 29
5. HIT MENUS .............................................................................................................................................................. 30
5.1 FILE MENU .......................................................................................................................................................... 30
5.2 EDIT MENU .......................................................................................................................................................... 30
5.3 VIEW MENU......................................................................................................................................................... 31
5.4 LOGS MENU ......................................................................................................................................................... 31
5.5 DEVICE MENU ..................................................................................................................................................... 31
5.5.1 Device|Connect ............................................................................................................................................... 32
5.5.2 Device|Set Configuration................................................................................................................................. 33
5.5.3 Device|Set Configuration|COM ....................................................................................................................... 34
5.5.4 Device|Set Configuration|TCP/IP .................................................................................................................... 43
5.6 RUN MENU .......................................................................................................................................................... 44
5.7 DEBUG MENU ...................................................................................................................................................... 44
5.7.1 Breakpoint ...................................................................................................................................................... 45
5.7.2 Clear All Breakpoints ...................................................................................................................................... 45
5.7.3 Active Variables List........................................................................................................................................ 46
5.7.4 Watch Properties............................................................................................................................................. 46
5.7.5 Call Stack........................................................................................................................................................ 47
5.8 BATCH QUEUE MENU ........................................................................................................................................... 47
5.8.1 Add To Batch Queue........................................................................................................................................ 48
5.8.2 Add Case List Options Dialogue...................................................................................................................... 49
5.8.3 Syntax Check All Jobs...................................................................................................................................... 49
5.8.4 Restart ............................................................................................................................................................ 49

Issue Date Page (Pages)


1.19-0 2/4/2008 3 (88)
HIT User's Guide

5.8.5 Stop After........................................................................................................................................................ 49


5.8.6 Timer .............................................................................................................................................................. 49
5.9 OPTIONS MENU .................................................................................................................................................... 50
5.9.1 Options|Interpreter.......................................................................................................................................... 50
5.9.2 Options|Environment....................................................................................................................................... 51
5.9.3 Options|Toolbar.............................................................................................................................................. 52
5.9.4 Options|Toolbox.............................................................................................................................................. 52
5.9.5 Options|Server ................................................................................................................................................ 53
5.9.6 Options|Windows Defaults............................................................................................................................... 53
5.9.7 Options|Load/Save Environment...................................................................................................................... 54
5.10 WINDOW MENU ................................................................................................................................................... 55
5.11 HELP MENU ......................................................................................................................................................... 55
5.11.1 About .......................................................................................................................................................... 55
5.11.2 HIT Help..................................................................................................................................................... 55
6. HIT TOOLBAR......................................................................................................................................................... 57
6.1 CREATE NEW FILE ICON ....................................................................................................................................... 57
6.2 OPEN FILE ICON ................................................................................................................................................... 57
6.3 REPLACE FILE ICON ............................................................................................................................................. 58
6.4 SAVE ICON ........................................................................................................................................................... 58
6.5 UNDO ICON .......................................................................................................................................................... 58
6.6 CUT ICON ............................................................................................................................................................ 58
6.7 COPY ICON .......................................................................................................................................................... 59
6.8 PASTE ICON ......................................................................................................................................................... 59
6.9 SEARCH ICON ....................................................................................................................................................... 59
6.10 SEARCH AND REPLACE ICON ................................................................................................................................. 59
6.11 SEARCH AGAIN ICON ............................................................................................................................................ 60
6.12 INTERACTIVE / FAST MODE .................................................................................................................................. 60
6.13 SYNTAX CHECK ICON ........................................................................................................................................... 60
6.14 RUN ICON ............................................................................................................................................................ 60
6.15 STOP ICON ........................................................................................................................................................... 60
6.16 RESET ICON ......................................................................................................................................................... 61
6.17 RUN TO NEXT ‘TRANSMIT’COMMAND .................................................................................................................. 61
6.18 RUN TO CURSOR .................................................................................................................................................. 61
6.19 SKIP NEXT COMMAND .......................................................................................................................................... 61
6.20 JUMP TO USER DEFINED STEP ............................................................................................................................... 61
6.21 STEP OVER .......................................................................................................................................................... 61
6.22 STEP TROUGH / TRACE INTO ................................................................................................................................. 61
7. SOFTWARE UPGRADE FEATURES ..................................................................................................................... 62
7.1 PROJECT FILES ..................................................................................................................................................... 62
7.1.1 Project Startup................................................................................................................................................ 63
7.1.2 STRICT Mode Restrictions .............................................................................................................................. 65
7.2 EVENT HANDLERS ................................................................................................................................................ 66
7.3 ERROR RECOVERY ............................................................................................................................................... 66
7.4 STATE SAVING/LOADING ...................................................................................................................................... 67
8. USE OF DLL AND DDE ........................................................................................................................................... 68
8.1 DYNAMIC LINK LIBRARIES, DLL .......................................................................................................................... 68
8.2 DYNAMIC DATA E XCHANGE, DDE ....................................................................................................................... 69
9. MISCELLANEOUS HIT INFO ................................................................................................................................ 71
9.1 FUNCTION KEYS .................................................................................................................................................. 71
9.2 COMMAND LINE ................................................................................................................................................... 71
9.3 EMBEDDED MML-COMMANDS ............................................................................................................................. 72

Issue Date Page (Pages)


1.19-0 2/4/2008 4 (88)
HIT User's Guide

10. REMOTE USAGE OF HIT................................................................................................................................... 73


10.1 HIT SERVER ........................................................................................................................................................ 73
10.2 TTCN CONFIGURATION ....................................................................................................................................... 74
11. MESSAGE MONITORING .................................................................................................................................. 75
11.1 SETTING MONITORING ......................................................................................................................................... 75
11.2 GATHERING MONITORING .................................................................................................................................... 76
11.3 THE ZOE MONITORING ........................................................................................................................................ 76
12. TESTING TIPS ..................................................................................................................................................... 78
12.1 NOTES FOR C USERS ............................................................................................................................................. 78
12.2 WRITING MACROS ............................................................................................................................................... 79
12.3 STYLE GUIDE ....................................................................................................................................................... 79
12.4 FUNCTIONS .......................................................................................................................................................... 80
12.5 WRITING LISTS .................................................................................................................................................... 83
13. LIBRARIES........................................................................................................................................................... 84
13.1 HIT SYSTEM LIBRARIES ....................................................................................................................................... 84
13.2 DLL-LIBRARIES ................................................................................................................................................... 84
14. APPENDICES ....................................................................................................................................................... 85
14.1 APPENDIX 1: DEFAULT CHAR USAGE ..................................................................................................................... 85
15. EXAMPLES DIRECTORY .................................................................................................................................. 87

16. VERSION HISTORY............................................................................................................................................ 88

Issue Date Page (Pages)


1.19-0 2/4/2008 5 (88)
HIT User's Guide

1. INTRODUCTION

This document details the usage, operation and configuration of the HIT system. Although the HIT macro
language is referred to, this document does not attempt to detail the language. See HIT_REF.PDF for
the language definition. In addition to describing the system and testing environment some tips for macro
writing are provided.

It is advisable that the user have the HIT application open while reading this document to more easily
refer to the items described.

HIT is generally used for integration testing, but is also used for module- and release testing.

1.1 Documentation

Documentation listed below is included in the HIT installation package.

Document Description
[Link] HIT Users Guide, MACROS, CASELISTS & BATCHQUE
HIT_REF.PDF The test execution language specification
[Link] Debugger document
[Link] Hexadecimal Conversion library (DLL)
[Link] Custom Dialog Box library (DLL)
DDE_XL.PDF Document of DDE example

1.2 System Requirements

HIT 2.x is designed to operate on Windows NT,95,2000 and XP.

The HIT installation requires approximately 10MB disk space, of which the documentation occupies
approximately 5MB.

The following is recommended as standard configuration for HIT workstations:


• processor: Pentium
• 64 MB RAM
• disk storage: 512 MB / 1GB
• 17 inch display

1.3 Installation Instructions

The Microsoft Installer package (.MSI) or [Link] (depending on the source of the installation
package you got) takes care if installation of the HIT tool. Note that the installation directory and the
location of the system components may vary with different HIT versions.

Ver. Executable InstallDir ExeDir IncludeDir


2.x [Link] c:\Program Files\hit2 c:\Program Files\hit2\system c:\Program
Files\hit2\include

Issue Date Page (Pages)


1.19-0 2/4/2008 6 (88)
HIT User's Guide

The INCLUDE directory contains system macros that are included when HIT is performs collection of
charging- and statistics reports. The [Link] system macro is included when message
monitoring is performed.

Following files comprises the core of the HIT test case driver:

File Description Location


[Link] The executable file. ExeDir
[Link] Interpreter DLL ExeDir
[Link] Communication DLL ExeDir
[Link] Help for the HIT driver ExeDir
[Link] HIT Help database file ExeDir
[Link] Help for error messages and dialogs ExeDir
[Link] Help BROWSER dll file windows\system
[Link] Help "TEXT FIND" dll file windows\system
[Link] DLL needed by [Link] ExeDir
[Link] DLL needed by [Link] ExeDir
[Link] DLL needed by [Link] ExeDir
[Link] Macro called by /M, /H and /I flags for setting IncludeDir
message monitoring. Valid only for MSCHLR
test configuration.
[Link] Macro called by /R flag in HIT Options menu. It IncludeDir
checks for hanging resources
[Link] Macro called by /T flag in HIT options menu. It IncludeDir
performs statistical measurements.
[Link] Macro called by /C flag in HIT options menu. It IncludeDir
performs charging records.
[Link] Allows use of old HIT 1.6 style ask() function IncludeDir
[Link] Redefine device functions to prints-statements IncludeDir
MT_FUNCT.HIT Module testing functions IncludeDir
[Link] Support DDE & launching of Excel application. IncludeDir
[Link] Macro called by /A for alarm checking IncludeDir

In case of problems using HIT, you should check the version information of the tool. The version
information of HIT is shown by the About command in the Help menu and in the title bar of the Online
Help

Issue Date Page (Pages)


1.19-0 2/4/2008 7 (88)
HIT User's Guide

2. SYSTEM CONFIGURATION

2.1 Desktop

Issue Date Page (Pages)


1.19-0 2/4/2008 8 (88)
HIT User's Guide

2.2 TOOLBAR ICONS

Create a new file


Open a file
Replace with the file
Save File

Undo
Cut the selection and put it on Clipboard
Copy the selection and put it on Clipboard
Insert the Clipboard contents at the insertion point

Find the specified text


Find the specified text and changes it
Find next match

Interactive / Fast Mode

Check syntax without executing macro


Start macro or list (depends on active window)
Stop macro
Reset macro

Run to next ‘
transmit’command
Skip next ‘
transmit’command

Run and stop on cursor location


Execute the current statement running any functions at full speed
Execute the current statement stopping within any functions called

Contains all .INI-files found in HIT-system directory (where [Link] is located)

Issue Date Page (Pages)


1.19-0 2/4/2008 9 (88)
HIT User's Guide

2.3 [Link] File

Connections are defined in a configuration file, [Link]. The devices connected via RS-232 or TCP/IP
links to the test system are defined here. The configuration file, which defines the name of the logical
device, the utilized COM port or TCP/IP socket, and prompt handling for the port, is described below.

The number of devices that can be connected to the system is limited by the hardware of the test PC.
The standard laboratory configuration is two internal COM ports in the PC and eight COM ports using a
serial adapter card attached to the PC.

All data needed to control a connection is stored in the [Link]. The device configuration can be
modified using the Device/Set Configuration menu. Device settings can also be changed when running
the macros, using HIT system functions.

The device configuration can be defined for the HIT icon by specifying the "ini" file on the icon command
line, for instance /I=c:\test\[Link].

Example [Link] file:


[CONNECTION_1]
NAME=MMLMSC
PORT=COM2
PROMPTCHECK=BOTH
ECHOCHECK=ON
TIMEOUT=10
SUFFIX=\r
RATE=9600
PARITY=EVEN
DATABITS=7
PROMPTDELAY=0
STOPBITS=2
FLOW=Xon/Xoff
PROMPT_1=""
PROMPT_2=""
PROMPT_3=""
REVIVAL_1="\r"
REVIVAL_2=""
REVIVAL_3=""
REVIVAL_4=""
BREAK=CTRL-Y,CTRL-C
TYPE=1
USERNAMEQ=ENTER USERNAME <
PASSWORDQ=ENTER PASSWORD <
USERNAME=SYSTEM
PASSWORD=0616050C0707171C144944445F45444954434F4E465F5254244944445F454400E0
EXTRAQ=""
EXTRAA=""
EXTRAQ2=""
EXTRAA2=""
DEFAULTKEY="\r"
SSH_CONN_TYPE=SSH
SSH_LOGINTYPE=SHARED_SECRETS

Issue Date Page (Pages)


1.19-0 2/4/2008 10 (88)
HIT User's Guide

SSH_VERSION=1
SSH_PORT=22
SSH_PRIVATEKEYFILE=""
SSH_CMDLINEPARAMS=""
SSH_SECLEVEL=0
SSH_OVERRIDESETTINGS=0
SSH_LOGFILEHANDLING=APPEND

[CONNECTION_2]
NAME=BENCH
PORT=[Link]
PROMPTCHECK=BOTH
ECHOCHECK=ON
TIMEOUT=10
SUFFIX=\r
RATE=9600
:
:

A maximum of three (3) prompts and (4) revivals may be defined for each device.

The number of devices is limited to 200 COM-types and 200 telnet-types.

The suffix (carriage return as default) is appended to the end of each command string sent by the tx()
function call. This automatically adds the return character, which the user normally enters at the end of
the command line, in order to execute the command. The suffix can also be an empty string, in order to
turn off this feature. Note that the suffix is not applied to the commands issued with the send() function.

The command sending can be synchronized using the promptcheck feature. As default the promptcheck
is defined as BOTH. The system checks that the prompt string is available both before sending the
command, and respectively delays the completion of the tx()- function until the prompt is visible again
after issuing the command to the device.

If the defined prompt does not become visible, the revival options are used in order to regain the device
prompt. The timeout value (seconds) is used to control when the next revival (or resurrection) attempt
should be made.

The promptcheck does not apply to the send() function. Commands issued with send() function are only
synchronized by a requirement of a 0.5 second idle in the response (received character flow). The
sending of outgoing characters is postponed until a sufficiently long idle has occurred. The idle time and
maximum wait before sending can be modified. See the system functions manual, functions
settransmitdelay() and gettransmitdelay().

The items in the INI file are:

Device Parameter Description


[CONNECTION_X] Block identifier under which the user can define connections. Both
COM and TCP/IP ports are listed under the CONNECTION_X
identifier
NAME= The NAME field is the logical name for the physical connection. This is

Issue Date Page (Pages)


1.19-0 2/4/2008 11 (88)
HIT User's Guide

the input to the device() function. The HIT system does not include a
function for changing the name on-line; the name must be set in the
Device dialogue. Devices are accessed with the device() function
PORT= The physical link defined for the connection. The HIT system does not
include a function for changing the port on-line; this must be done
from the Device dialogue. Either COMxx or TCP/IP address. The
TCP/IP address can be given as absolute location (including port
number) or as symbolic service name, which is translated into
absolute address by the network name server. The port number is
optional. Default port number is 23 (= telnet session). Example of
TCP/IP address containing a port number [Link]:25 (port 25
is reserved for SMTP)
RATE= The baud rate of the connection. The standard baud rate for the DX is
9600; it can, however, transmit at a higher rate.
PARITY= Parity flag for the link, parity for DX-200 is 7Even2. The HIT system
does not include functions for changing these items; then can be
changed only through the Device dialogue.
TIMEOUT= The TIMEOUT field of the device structure determines how long the
system will wait for the prompt. When a command is sent the system
immediately starts to examine returned data. The occurrence on
QEUSTION strings in the response is continuously checked as new
characters are received from the device. The timeout value is used to
initiate resurrection, if the prompt fails to become visible as expected.

The user can modify the timer duration for the active connection. The
modification is active until the device is changed; setting the device to
the same connection is functionally equivalent to changing the device.
The timeout can be modified in a macro with the timeout() function.
PROMPTCHECK= BOTH, the system checks that the prompt defined for the device is
available both before sending a command. The macro execution is
waiting at the tx() statement, and does not proceed until the prompt is
visible. This indicates that the command response has been
completed, allowing synchronization of transmitted commands. If no
prompt becomes visible a timeout occurs, which will initiate the
resurrection feature.
BEFORE, the system checks that the prompt defined for the device is
available before sending a command. This mode is used when the
macro must continue, without waiting for the response from the device
to complete.
AFTER, when checking is done after the command, control is not
returned to the macro until the prompt is found or timeout occurs.
NONE, the prompt is not checked either before or after sending a
command.
PROMPT_X= PROMPT is a string containing the prompt possibilities for the device.
The prompt is used to synchronize command sending, so that HIT
waits for each command to be completed before sending a new
command. For DX-devices most of the prompt strings are built-in. (see
table below)

The user normally does not have to define prompt strings at all, with

Issue Date Page (Pages)


1.19-0 2/4/2008 12 (88)
HIT User's Guide

the exception of non-DX equipment, or telnet sessions to VAX or


UNIX systems
SUFFIX= Define the character(s) appended to the end of every command
transmitted with the tx() function. Generally this is carriage return, "\r".
The suffix is not applied to data sent with either the send() or answer()
functions. (string length 4 characters)
REVIVAL_X= Define the control codes to be sent to the device if the prompt
character string can not be found.
USERNAMEQ= Automatic login: a question received from the device that is answered
with string defined in USERNAME
PASSWORDQ= Automatic login: a question received from the device that is answered
with string defined in PASSWORD
USERNAME= Automatic login: an answer that is sent to the device when the string
defined in USERNAMEQ is received
PASSWORD= Automatic login: an answer that is sent to the device when the string
defined in PASSWORDQ is received. Note that this field is crypt to
give little protection to the passwords used with the HIT.
EXTRAQ= Automatic login: possible an additional question that requires user
input during login sequence e.g. some kind of Y/N style question
EXTRAA= Automatic login: answer to question defined in EXTRAQ field
EXTRAQ2= Automatic login2: possible an additional question that requires user
input during login sequence e.g. some kind of Y/N style question
EXTRAA2= Automatic login2: answer to question defined in EXTRAQ field
FLOW= flow control XON/XOFF
BREAK= break character CTRL-C, CTRL-Y
TYPE= 1 = DX device
USERNAMEQ_2ND= Automatic login: a question received from the device that is answered
with string defined in USERNAME_2ND
PASSWORDQ_2ND= Automatic login: a question received from the device that is answered
with string defined in PASSWORD_2ND
USERNAME_2ND= Automatic login: an answer that is sent to the device when the string
defined in USERNAMEQ_2ND is received
PASSWORD_2ND= Automatic login: an answer that is sent to the device when the string
defined in PASSWORDQ_2ND is received. Note that this field is crypt
to give little protection to the passwords used with the HIT.
DEFAULTKEY= Default value for the second parameter in device() systemfunction call.
PROMPTDELAY= Secure delay which adjust execution for slower networks (default
=0ms = doesn't affect execution at all)
SSH_CON_TYPE= type of used protocol (NONE, FTP, TELNET, SSH, SFTP)
SSH_USED= 0=do not use SSH for the connection
1=use SSH (i.e. this connection will be secured)
NOTE: Legal, but obsolete, replaced by SSH_CONN_TYPE in newer
.ini files
SSH_LOGINTYPE= login method (SHARED_SECRETS for password, KEYS for private
key)
SSH_VERSION= SSH protocol version (1 or 2)
SSH_PORT= SSH port (22 by default)
SSH_PRIVATEKEYFIL path to a file with private key, only relevant with KEYS login method
E=

Issue Date Page (Pages)


1.19-0 2/4/2008 13 (88)
HIT User's Guide

SSH_CMDLINEPARA additional parametrs for plink/psftp, e.g. "-v" = message verbosing


MS=
SSH_SECLEVEL= defines behavior on ssh security warning
0=HIGH connection will be abandoned
1=MEDIUM server will be marked as trusted for the current session
2=LOW server will be marked as trusted for all future sessions
3=NOACTION nothing will be done
SSH_OVERRIDESETT 0=use above SSH settings
INGS= 1=use SSH_CMDLINEPARAMS as parameters to plink, ignore all
other settings

NOTE: when set to 1, you have to specify all the parameters, including
login details

e.g. -pw pass -1 user@host


SSH_LOGFILEHANDLI not used, for future development
NG=

When device( ) function is called without the optional keying parameter, the device( ) function sends a
carriage return character to the device in order to receive the prompt. By defining an empty keying string
this feature can be turned off.

2.4 User Defined Prompt Strings

The user can define three (3) prompt strings that are used for synchronization of command sending in
HIT. In addition to the user defined prompts, the tool also provides preprogrammed patterns, that are
needed for DX-devices.

Prompt pattern Remark


>|< MML-prompt
|XX-AAA> Service Terminal, Debugger prompt
|XX-AAA-B> Service Terminal, command extensions
|XX-AAA-B-CCC> Service Terminal, command extensions
|XX-AAA-B-CCCC> Service Terminal, command extensions
|XX_AAA-BBBB> Service Terminal, command extensions
|XXXX-AAA> Service Terminal, Debugger prompt
|XXXX-AAA-B> Service Terminal, command extensions
|XXXX-AAA-B-CCC> Service Terminal, command extensions
|XXXX-AAA-B-CCCC> Service Terminal, command extensions
|XXXX_AAA-BBBB> Service Terminal, command extensions
|ENTER PASSWORD < PASSWORD
|ENTER USERNAME < USERNAME
|/*** ILLEGAL PASSWORD| illegal user password
|END OF DIALOGUE SESSION|| end of dialogue session
|END OF SERVICE TERMINAL SESSION| end of terminal session, consol C0
|END OF SERVICE TERMINAL SESSION end of terminal session, consol C1
||DEBUGGER READY",
|DEBUGGER READY debugger ready
|DIALOGUE DESTINATION <

Issue Date Page (Pages)


1.19-0 2/4/2008 14 (88)
HIT User's Guide

|READY - WO
|READY - SP

Linefeeds are represented by | (vertical bar, pipe). Service Terminal (Debugger) prompts have wildcards
that match for direct and remote sessions.

WARNING: do not define QUESTIONS and PROMPTS that conflict with the built-in promptchecks. The
conflicting user defined DX-prompt will cause premature command sending, while the conflicting
Question will transmit the answer string for each prompt match.

PROMPT/QUESTION strings should be as significant as possible, so that they do not trigger at the
wrong moment. Prompts/questions strings using a single character should be avoided.

Defining the single “>“as prompt or question for MML-devices will cause conflict with the built-in
promptchecking and command sending will not be possible.

2.5 Troubleshooting

Some problems that might occur, when executing the macros

• warnings during compilation of macro


• syntax error during compile time
• warnings during runtime
• errors during runtime
• file open problems
• getline doesn’ t find target string
• strfetch causes runtime error
• device not created
• device not responding
• prompt not found
• echo errors

Warnings during compilation of macro

a) Unused variables
b) Possibly uninitialized variables
c) Possible incorrect assignments single equal sign inside if / while expression

Syntax error during compile time

a) Missing semicolons, commands, parenthesis


b) Incorrect string quotation, missing quotes, backslash problems
c) Incorrectly spelled function names
d) Undeclared variables, etc

Issue Date Page (Pages)


1.19-0 2/4/2008 15 (88)
HIT User's Guide

Warnings during runtime

Print-statement argument number does not match the formatting string


string s="Hello World";
integer X=5;

print("%s %d\n",s); // you forgot the X

Errors during runtime

a) invalid getline search criteria, missing small quotes


b) invalid strfetch criteria, missing small quotes
c) invalid array indexing

File open problems

a) file does not exist at all


b) file exist, but not in the specified directory

Use fileaccess() to check file existence

getline doesn’t find target string

a) string does not occur in the response


b) string occurs in response, but log file read pointer has moved past the line

check getline() return value - use logseek(LAST) to move to beginning of response

strfetch causes runtime error

a) target substring does not occur in the target line, as the user expected
b) input string is shorter than expected

Verify substring occurrence with strstr() function

Device not found

a) user has not created the device from menu Device/Set Configuration
b) devicename incorrectly spelled

Create missing device with Device/Set Configuration

Issue Date Page (Pages)


1.19-0 2/4/2008 16 (88)
HIT User's Guide

Device not responding

a) cable to device has been disconnected


b) the device session is jammed, and will be released by Ctrl-C, Ctrl-Y or similar key press

Use sniff() function to check device before using it

Prompt not found

a) device type must be DX if connected to DX200 network elements


b) device is jammed, and resurrection methods 1-4 should be used

Check device settings from Device/Set Configuration

Echo errors

a) characters are actually lost when sending with tx-command


b) send-function should be used instead of tx, because sent characters are not echoed
back or are echoed back differently (for instance when using editor commands like
ZOBE)
c) user has defined improper prompt strings, like
prompt 1: >
prompt 2: <
prompt 3: (a space character)
** Echo error detected **
Mismatched echo: [ ZDD:G40,+]
Expected echo: [ZDD:G40,+F]

Check device settings from Device/Set Configuration

Issue Date Page (Pages)


1.19-0 2/4/2008 17 (88)
HIT User's Guide

3. HIT WINDOWS

The HIT system has eight window types, used for various operation of the tool.

N Window Remark
1 Macro Edit/Run test case
2 List Edit/Run case list = sequence of test cases, applying given case list
options
3 Response Inspect sent commands and their responses
4 Messages Compiler messages, runtime warnings, runtime errors, messages printed
by the user with print() and printlog() functions.
5 Batch Insert/Remove/Execute test cases (macros, case lists or batchjob lists)
6 Terminal Interactive session
7 Info additional text information with description of macro variables
8 Project Edit/Run the project file, used for software upgrades

Macro and List windows are used for editing the test cases. The Response window allows the user to
follow commands that are sent, and inspect the command responses. Terminal Windows are used for
interactive testing in conjunction to tests performed with HIT-macros. The info window provides
additional information about variable

3.1 HIT Editor

The Macro and List Windows have an editor allowing the user to create and modify files or lists. The
basic keystroke operations are listed below.

Edit Key
Undo Ctrl-Z, Alt-Backspace
Cut Ctrl-X, Shift-Delete
Copy Ctrl-C, Ctrl-Insert
Delete Ctrl-Delete
Select All Alt-E-A
Find Ctrl-F
Replace Ctrl-H
Find Next F3
Goto Ctrl-G
Complete word F2
Complete keyword Ctrl-F2
Home cursor movement
End page scrolling
Page Up highlight text
Page Down
arrow keys

Text is highlighted by dragging the mouse, or moving the cursor with arrow keys whit shift-key is held
down (Shift-Up, Shift-Down, etc.). You can select rectangle area (columns) by pressing Alt-key while you
highlight the area as described above.

Issue Date Page (Pages)


1.19-0 2/4/2008 18 (88)
HIT User's Guide

Selected (highlighted) lines can be intended (move right) by pressing Tab-key – this will insert tab-
character to the beginning of those lines and well as move left by pressing Shift & Tab keys
simultaneously.

The editor has Undo capabilities. Also it has keystroke replacement of highlighted text. Cut, copy, paste,
and delete features can be accessed through the Edit Menu. The file size limit of the editor depends
upon the PC's capabilities but it can easily handle macros and lists of several thousand lines, a limit
sufficiently large enough satisfy most user needs. The line length is not limited.

The HIT editor accepts macros or lists written by DOS editors, such as Brief or DOS Edit. The editor can
not import files from word processors (i.e. WRITE or WORD). The editor supports Scandinavian
characters, äÄåÅöÖ, but if the original source file was not written by the HIT editor it can not be
guaranteed that the characters will be correctly exchanged.

Note that DOS-filenames are limited to 8+3 characters. In WinNT (and Win95) the filenames can be
longer, and also contain special characters, for instance spaces. Although possible to use longer
filenames than 8+3, it is recommended to use DOS compatible filenames if possible.

The right mouse button activates a popup-menu for a window, i.e. the macro edit window:

3.2 Macro Window

The Macro Window displays the macro currently being edited or executed. A new macro can be created
from the “File|New”-menu or alternatively toolbar. HIT assumes that all macros have the file extension
.TEL (or HIT). The naming convention is not mandatory, but is recommended for semantic consistency.

Several macro and case list windows can be open at the same time (multiple document interface, MDI).
However a particular file can only be opened once into the editor. If the file is attempted to open into a
second macro window, the command is ignored and the already open macro window becomes active.

The positions of the macro windows can be stored into the desktop. The desktop can be stored by
checking the Options|Save Settings. When HIT is restarted the window positions are restored. Desktop
settings are stored in the Windows NT registry.

The File|Open selection loads an existing macro. The Open Macro/List/Text/Project options are
combined into a single option Open, continued with a secondary selection list.

Edited macros can be saved with the selection File|Save or File|Save As , or alternatively with the save
icon from the toolbar. The "Save" is disabled unless the file is new and has not been saved after editing.

Issue Date Page (Pages)


1.19-0 2/4/2008 19 (88)
HIT User's Guide

When the user runs or syntax checks a macro in the macro window the system automatically saves the
file before performing the task, if the file has been edited. Before saving, the original file is backed up
as “Backup of <filename>“. The macro can be run from either the Run Menu or from the Run icon (Play-
button). While running the line being executed can optionally be highlighted where the feature is
controlled by the Options|Environment menu--explained in document section Options Menu, or by
using the highlight() function in macro itself.

The HIT system editor highlights HIT macro language keywords and comments in the macro. The
system also supports on-line help for the HIT macro language, which can be invoked by pressing the F1
function key. If the cursor is at a component of the language, the Help for that item will appear (otherwise
the general Help will be called)

When the user selects Edit|Run the topmost window is executed. This must be one of the following

• macro window
• list window
• batchjob window
• project window

3.3 List Window (case list)

The List window allows the user to define a test suite. Lists allow the user to group together large series
of related macros and execute them; in short lists allows automated testing. Lists incorporate several
testing specific features such as message monitoring and charging and statistics.

In addition to automated testing the same macro to be called several times and allow parameterization of
said macro; a list provides a common interface to a collection of macros.

If only some of the cases in the list are wanted to be run, user can select them by pressing CTRL-key
and simultaneously double-clicking the line of the case.

3.4 Batch Queue Window

The Batch Queue Window permits the user to submit a collection of lists to be executed. Access to the
window is provided by the Batch Queue menu. Because test laboratory PCs are often used by several
test teams a mechanism for allowing many users to submit test cases is required. The Batch Job serves
this need. Users enter their jobs. #options and user names to the queue. When all users are ready the
queue is started; generally this is used for overnight testing.

Jobs can be added and deleted one at a time from commands in the BatchQueue menu. The user may
highlight several jobs and delete them with the delete key. The menu does not have a “remove all jobs”
command; this constraint exists to prevent a user from accidentally deleting a queue. If the user has
multiple lists, those can be written to a file (BatchJobList, *.BJL) and the whole file submitted to the
queue. Note that jobs can be added only through the Batch Queue menu; the Batch Jobs Window can
not be directly edited.

The queue can be started from either the Batch Queue menu or from the Run icon.

Double clicking an item in the Batch Queue window causes the list to be opened in the list window.

Issue Date Page (Pages)


1.19-0 2/4/2008 20 (88)
HIT User's Guide

3.5 Message Window

The Message Window displays run time information. The result of macro syntax check is also output to
the messages window. Either the promising “Got no compile errors.”or a list of errors or warnings will be
printed out. A macro can directly write to the window using either print() or logprint() functions of the HIT
language. If user wants to save the contents of the window “Print messages to file”-option should
checked on from the Options|Environment menu before execution. The window provides the tester a
method for displaying run time information about the test case's status.

3.6 Response Window

The purpose of the HIT system is to interface with and control test devices. The user prompts the device
for some action and the device responds. All device responses are displayed to the Response Window.
The contents of the window are copied to log files, where the name can be either user defined or system
defined. The user can scroll through the window to investigate device action.

The window has copy capabilities.

3.7 Terminal Window

Whenever a user establishes a direct connection to a device by the functionality provided through the
Device menu, a window to the device is opened. The contents of the window are automatically logged to
file "[DeviceName].log" in the LOGS-directory, where DeviceName is the logical name for the device
truncated to 8 characters.

Log files are stored in HIT2/LOGS directory. The total file size of the directory is not limited, so the user
must delete old log files every now and then, in order to release disk space. User can limit the size of a
single log file, so that the PC will not run out of disk space, if the user forgets to stop an command using
continuous display mode (for instance continuous memory display “ZDC:G40,+FF”)

User has also possibility to log certain session of terminal window contents. Session will be recorded to
user defined file, and default file is “[DeviceName]_record.log”in the LOGS-directory. Furthermore user
may define whether session is added to the existing file content or whether the file is recreated. Session
logging can be started via terminal window popup-menu:

Issue Date Page (Pages)


1.19-0 2/4/2008 21 (88)
HIT User's Guide

As logging has been started by a user, the software writes all window content to default log and
furthermore to session log. Session logging can be stopped anytime by “Stop Logging”popup-menu
command (not visible if logging is not on). However, logging is automatically stopped as the terminal
window is closed.

The window has cut, copy and paste capabilities.

The following control key sequences have special meaning for some devices. Here is a list of keystrokes
important when the connected device is the DX service terminal or the MML session.

Control Sequence Description


up-arrow previous command
down-arrow next command
CTRL-A toggle insert/overwrite
CTRL-B previous command
CTRL-D backward one character
CTRL-E end of line
CTRL-F forward one character
CTRL-G delete character
CTRL-L show last command
CTRL-N next command
CTRL-Q XON, resume transmission, scrolling
CTRL-R repeat-last-command
CTRL-S XOFF, pause transmission
CTRL-U ignore command
CTRL-W beginning of line
CTRL-X ignore command
DEL delete backwards one character

Issue Date Page (Pages)


1.19-0 2/4/2008 22 (88)
HIT User's Guide

Line editing commands are listed with the ZI-command

3.8 Summary of Window Editing Capabilities

Window Property
Macro Edit,Cut,Copy,Paste
List Edit,Cut,Copy,Paste
Response Copy
Messages Copy
Terminal Copy,Paste

All window contents can be printed with File|Print

Issue Date Page (Pages)


1.19-0 2/4/2008 23 (88)
HIT User's Guide

4. CASE LISTS

The case list options MUST UNDER NO CIRCUMSTANCES be used on


operational network element such as MSC or HLR. Read section 4.7 Case list
restrictions - LIVE SWITCH WARNING

The List window allows the user to define a test suite. Lists allow the user to group together large series
of related macros and execute them; in short lists allows automated testing. Lists incorporate several
testing specific features such as message monitoring and charging and statistics.

In addition to automated testing the same macro to be called several times and allow parameterization of
said macro; a list provides a common interface to a collection of macros.

The HIT system processes the list one line at a time. This means that a list item can not encompass
multiple lines. Each list item must be preceded by either E or P in column one, if not the line is ignored
(equal to comment). The only exceptions are the following case list directives:

Directive Description
#options define case list options, message monitoring, charging, statistics, etc.
#incpath define path(s) for included macros / include directory

A list is executed by either Run Menu (F9) or by the Run icon of the toolbar. If the user wishes to execute
only selected cases from the list, those cases can be marked by clicking the mouse while the CTRL is
held down. Alternatively: position the cursor on the item and using the CTRL+UP or CTRL+DOWN
arrows to highlight the line.

The selected case list lines are painted green. All unselected lines are ignored, including possible
#options lines. Note: if the options need to be applied, these must also be selected in the same manner.
If no lines are selected, the whole case list is executed as default.

An empty #options-statement at the beginning of the case list can be used to turn off those default
options that are not needed in a particular case list.

Double clicking an item in the list window causes the macro to be opened in the macro window.

Though not mandatory, it is recommended for standard convention purposes that list files have the .LST
extension.

4.1 Case List Syntax

The case list contains lines, with following alternatives

Notation Description
#options item item Case list options for P-cases
#incpath path1;path2;... define include directory or directories
E<CaseName>FileName::FunctionName(X) E-case, or EXECUTE
P<CaseName>FileName::FunctionName(X) P-case, or PERFORM

Issue Date Page (Pages)


1.19-0 2/4/2008 24 (88)
HIT User's Guide

As default the log file for the test case is derived from the executed macro file, by replacing the filename
extension TEL (or HIT) with T30. With the optional rename brackets <CaseName> the log file can be
given a different filename. This feature allows the user to write generic macros which perform a given
task, but varying the test with different input parameters. The test results are placed into unique log files
by giving a different case name for each test.

Note: The options are used only with P-cases.

The P-case is the actual workhorse that performs the test case with the requested options. The E-case is
used to execute macros witch are not using definitions made by #options-statement.

The filename is followed by the scope parameter “::”and the function that should be called. The scope is
obligatory for P-cases. The called function can receive parameters values from the case list.

Although the scope parameter is optional for E-cases, it is recommended to explicitly define the called
function by name.

Output generated from macros called from lists is saved to the same directory where the list is located.
The output directory - or more precisely the working directory can be set using #options
/OUT="directorypath"

The [Link] is used to make initial preparations (or initial conditions) for the test case to be
executed. The [Link] is used for possible cleanup, and post processing of test results.

List example:
#options /T /C /M="BSU 132 STU 178 CHU 180" /H="CCSU 15B"
E c:\m7\generic\[Link]::main()
//Create defaults subscribers
E c:\m7\generic\[Link]::main(8) //8 subscribers

//Call the call forwarding macro, give it parameter


//telling which call forwarding to use. The IMSI
//is defined in file "[Link]" in the same
//directory; the macro includes the file

P <T01_0001> c:\TT01\M7\T20\[Link]::call("CFU", IMSI_0)


P <T01_0002> c:\TT01\M7\T20\[Link]::call("CFB". IMSI_1)
P <T01_0003> c:\TT01\M7\T20\[Link]::call("CFNA", IMSI_0)

4.2 #options Directive

The #options directive permits the user to call pre-written macros to be executed automatically as the list
is executed. These prewritten macros are located in the HIT2/INCLUDE directory. The options are
applied only to P class test cases. Options specified in the list override options specified in the
Options|Caselists dialogue. If the user wants to automatically ensure that no options are specified in the
menu insert the #options directive without parameters in the case list.

Long option lines can be split into several lines with " \" (space+backslash) characters at the end of line.

The syntax, where the directive must start from column 1:

Issue Date Page (Pages)


1.19-0 2/4/2008 25 (88)
HIT User's Guide

Syntax:

#options /T /C /P /R /L="PARAMS" \ /MSCMON="PARAMS"/HLRMON="PARAMS" /PRE="FILENAME"


/POST="FILENAME" \ /OUT="DIRECTORY"

You can also define your own flags that can be checked inside your macro with hasoption()
function (see hasoption function usage details from system function document or help).

List of predefined options:

Option Description
#options Define that options will be used. The directive must begin in column 1 of
the list.
/R Directs the HIT system to check for hanging resources in the Marker and
(/CALL_CHECKING) to ensure that the call ticket is complete. The flag calls macro
[Link] in the HIT\INCLUDE directory.
/T Statistics (Tilastointi) flag causes the system to perform statistical macros
for every P class test case. The macros are located in file [Link] in
the HIT\INCLUDE directory.
/C Charging flag causes the system to perform charging macros for every P
class test case. The macros are located in file [Link] in the
HIT\INCLUDE directory.
/P Change default calling order of pretest() and posttest() functions in
(/MONITOR_PRE) relation to the message monitoring option /M and /H.

Default calling order is: set_monitoring(), pretest(), main(), posttest(),


get_monitoring().

If /P flag is used, the calling order is: pretest(), set_monitoring(), main(),


get_monitoring(), posttest().
/MSCMON MSC Message monitoring flag causes the system to set message
(/MSCMON_FTP) monitoring using ZOE.. service terminal commands.
Example: /MSCMON="BSU:[SR:FAM=132,134] "
/HLRMON HLR Message monitoring flag causes the system to set message
(/HLRMON_FTP) monitoring using ZOE.. service terminal commands.
Example: /HLRMON="CCSU:[SR:FAM=127],STU:[SR:FAM=178]"
/OUT Set the output (working) directory
(/OUTPUT_PATH) Example: /OUT="C:\TEMP"
/USER Set specified username for every DX-type device that is configured in the
(/USERNAME) current .INI-file.
Example: /USER="SYSTEM"
/PASS Set specified password for every DX-type device that are configured in
(/PASSWORD) the current .INI-file.
Example: /PASS="SYSTEM"
/PRE Define pretest macro
(/PRETEST) Example: /PRE="C:\test\[Link]"
/POST Define posttest macro
(/POSTTEST) Example: /POST="C:\test\[Link]"

Issue Date Page (Pages)


1.19-0 2/4/2008 26 (88)
HIT User's Guide

/A Check alarms
(/ALARMS)
/DEVINI Load device configurations from the specified .INI-file
Example: /DEVINI="C:\TEST\[Link]"
/L Computer logs are collected using this option. PARAMS indicate the
(/LOGS) mode of execution, and which network elements should be checked.
Example: /L="125,M=BSU,M=PAU,H=OMU,MH=CCSU"
Execution mode is an integer 0x125. The computer logs of BSU and
PAU are checked in MSC, while OMU is checked in HLR. The computer
logs of CCSU are checked in both MSC and HLR. The execution mode
is obligatory, followed by a list of 0..20 computer units.

The computer log option mode is composed of hexadecimal digits, with least significant digit (the last
digit) having the zero order:

Order Digit
0 action after test case
1 action before test case
2 suppress test message (if nonzero)

Action before/after test case


digit action mode
0 No action
1 clear selected units
2 clear all units
3 read selected units
4 read & clear selected units
5 read selected, clear all units
6 read all units
7 read all, clear selected units
8 read & clear all units

Note: action mode=3*read_mode+clear_mode (0=none,1=selected,2=all)

Example: mode=125

(1) Suppress sending of test message (6034)


(2) Before test case, clear computer logs of all units
(5) After test case, collect computer logs from selected units, clear computer logs of all units

4.3 E Class Cases

The E parameter means execute. If the list item is called with this parameter no options will be applied to
the case.

4.4 P Class Cases

The P parameter means perform. If the list item is called with this parameter options will be applied to
the case.
Issue Date Page (Pages)
1.19-0 2/4/2008 27 (88)
HIT User's Guide

The case list options MUST UNDER NO CIRCUMSTANCES be used on


operational network element such as MSC or HLR. Read section 4.7 Case list
restrictions - LIVE SWITCH WARNING

4.5 .TMP Files

If options have been set, the system's pre-processor makes a temporary file calling the options in the
proper sequence. The .TMP-file will make references to system macros, located in the HIT2/INCLUDE
directory:

File function(s) #options


[Link] __set_async_monitoring() /MSCMON
__get_async_monitoring() /HLRMON
__computer_logs_begin() /L
__computer_logs_end()
[Link] __charge_init() /C
__charge_begin()
__charge_end()
[Link] __statistics_init() /T
__statistics_pre1()
__statistics_pre2()
__statistics_post1()
__statistics_post2()
__statistics_end()
[Link] __init_call_check() /R
__check_call()
User defined pretest() /PRE
User defined posttest() /POST

The HIT lists pre-processor writes to the .TMP file a structure for the case in which all the functions
specified by the options will be called in the correct order and the entry point is function __preproc().

For the following examples let the list file be:

P C:\CASELIST\[Link]::main()

And the test macro [Link] to be:


#include "[Link]"

function main()
print(“Performing the test case.\n”);
endfunction

Issue Date Page (Pages)


1.19-0 2/4/2008 28 (88)
HIT User's Guide

4.6 Case List Restrictions - LIVE SWITCH WARNING

The case list options are intended to be used only on a laboratory switch, with no ongoing traffic.

The case list options MUST UNDER NO CIRCUMSTANCES be used on


operational network element such as MSC or HLR.

system macro side-effect #options


[Link] sets process families into test mode /MSCMON
massive debug log writings to COMPUTER LOG /HLRMON
increased CPU-load
computer log wrap-around on live switch
--> important fault information may be lost

read or clear all computer logs /L


-> important fault information may be lost

[Link] /T
modifies SYSTEM CLOCK
with ZDCS-command
time set to 8:01:00 AM
increased CPU-load, due to 15 simultaneous traffic measurement
reports

[Link] Changes assignment of logical file GSMCHA in the MSC and /C


HLR. Creates linkage from logical file to physical file.

[Link] Remote sessions from OMU to marker unit. /R


connection inquiry commands
increased CPU-load

NOTE:
The HIT-tool has no means to verify if the devices are connected to an operational network element or a
laboratory switch. The user must be aware of the hazard that is accompanied with these macros.

The access to the ZDCS command should be restricted, in an operational switch, so that unauthorized
change of the system clock is prevented.

Issue Date Page (Pages)


1.19-0 2/4/2008 29 (88)
HIT User's Guide

5. HIT MENUS

The HIT menus provide a logical grouping of commands and procedures for control of the system
environment and macros.

5.1 File Menu

The File menu allows the user to create, open, or save macro and list files. It provides access to
Windows print system. Additionally the menu displays the last five files edited.

Most of the menu commands can also be selected directly from the toolbar button, for instance Open
Macro, File Save, etc.

The File|New selection gives a secondary selection, where the file type can be selected. Allowed options
are macro, case list, text and project.

5.2 Edit Menu

The Edit menu provides standard Windows editor commands. The Cut, Paste, Copy and Undo
commands also available as toolbar buttons

Issue Date Page (Pages)


1.19-0 2/4/2008 30 (88)
HIT User's Guide

5.3 View Menu

Opens and closes windows/views.

5.4 Logs Menu

The usage log shows what events have occurred during use of the HIT, from the usage log it is possible
to trace back to old warnings and error messages. The log is written to the HIT2/LOGS directory as
[Link]

“Insert Note”menu item adds user written notification to the log file. Note that item is grayed until a
macro has been started and it is in paused state.

"Log Viewer" menu item opens the main log file of the active macro.

5.5 Device Menu

The HIT system is designed to let the tester easily interface with and control devices, such as test
benches, switch units, UNIX workstations and simulators there; the devices are connected to the HIT PC
with either RS-232 COM ports or TCP/IP socket links. The Device|Set Configuration menu allows the

Issue Date Page (Pages)


1.19-0 2/4/2008 31 (88)
HIT User's Guide

user to define devices. The information written in the dialogues is stored in the [Link] file which is read
whenever the program is started; hence once system configuration and device handling information is
stored it does not need to be updated unless the configuration changes. It is crucial that the Device
menu be set correctly, if not the HIT system may not be able to communicate with the test devices.

Many of the items in the device dialogues can be set directly in a macro through HIT language function
calls. The functions handling devices are: device(), prompt(), promptcheck(), echocheck(), question(),
answer(), suffix(), timeout() and sniff(), see the online help for more information.

Correct system configuration is crucial, without it the test system simply will not work. The system
connects to the device either through the device() function in a macro or through the Device|Connect
menu command. In the latter case a terminal window to the device is open in which the user may
directly send commands to the device.

All communication with a terminal window is automatically written to a log file where the name is formed
from the window name with the extension “.LOG" appended. Log files are written into HIT2/LOGS
directory.

NOTE: do not use logical names “COM1”, “COM2”, “COM3”, etc. for ports. The operating environment
can not differentiate from the actual port and the logical name.

Most laboratory PC's will be equipped with one or more serial adapter boards, where each board
supports 8 or more additional COM links. Those COMs should be connected to either the C0 or C1 ports
of various units in the network element.

A viable connection solution is that the laboratory PC is connected to a bridge by TCP/IP and the bridge
is connected to the network element by COM ports. Because the connection to the bridge is a logical
address, this approach allows other PC to route through the same bridge and use the same port. The
user may even, for example, test from own office if a bridge connection is available. See the section of
this document detailing system configuration schematics.

All changes made to devices via the Device menu are saved in the [Link] file. The device menu has a
most recently used device list which can be used for quick opening of devices.

5.5.1 Device|Connect

The Device|Connect menu command permits the user to establish a direct connection to the concerned
device. The command opens a terminal window in which the user may enter commands. This feature is
extremely useful during interactive testing. As default the session is saved into log file in the HIT2/LOGS
directory. The log file writing can be disabled form the Options|Terminal Window menu.
The user simply double clicks the desired device name and the connection is established. It is also
possible to select multiple devices and open them at once.

Issue Date Page (Pages)


1.19-0 2/4/2008 32 (88)
HIT User's Guide

5.5.2 Device|Set Configuration

The Device|Set Configuration command presents the user a dialogue showing all defined connections
for the system. The use may edit a connection, delete it, or add new COM or TCP/IP connections. If the
connections are not currently in use, i.e. used by a macro or have a window open, the status of the
connection is closed. It is possible to select multiple devices and connect to them at once. Also, deleting
multiple devices is possible.

Issue Date Page (Pages)


1.19-0 2/4/2008 33 (88)
HIT User's Guide

5.5.3 Device|Set Configuration|COM

The Device|Set Configuration|COM command is used to define a device connected by a COM port to the
HIT system. An example tabbed dialogue is given below:

The fields for the dialogue are defined below; these are the same items stored in the [Link] file.
Default value for various fields is noted [value].

Field Description
Name Define the logical name for the device; this name is used as a parameter in
for the device() function call.
Port Select communication port [COM1].
Rate Specify transfer baud rate of the COM-port [9600].
Parity Specify the parity type [Even].
Data bits Specify the number of data bits in the data packets [7].
Stop bits Specify the time that elapses between transmitted characters [2].
Flowcontrol XON/XOFF or hardware using CTR/CTS
OK Save device settings to .INI-file and close dialogue.

Issue Date Page (Pages)


1.19-0 2/4/2008 34 (88)
HIT User's Guide

Field Description
Prompt Specify the possible prompts expected from the device. The tx() function
requires the prompt definition to determine if the device is ready. (Default
prompts are defined for MML and debuggers sessions and are not visible to
the user. For most cases the user need not define prompts if the device is
the MSC or HLR)
Check Specify when existence of the device prompt should be checked [Both].
Before the prompt is searched for before transmitting to the device.
After the prompt is searched for after transmitting to the device.
Both the prompt is searched for before and after transmitting to the device.
None the prompt for the device is not sought.
Timeout Specify the time to wait (in seconds) for the device prompt to appear. If the
prompt is not found the system sends the resurrections codes defined for
the device.
Prompt Delay Secure delay which adjust execution for slower networks (default =0ms =
doesn't affect execution at all)
OK Save device settings to .INI-file and close dialogue.

Issue Date Page (Pages)


1.19-0 2/4/2008 35 (88)
HIT User's Guide

Field Description
Username question A question received from the device that is answered with the string
defined in “Username”field. Note that if DX-checkbox is checked from the
Misc. tab then this field is disabled and normal MML string is used.

Note! The match is checked from the beginning of the line


Username An answer that is sent to the device when the string defined in “Username
question”field is received.

Do not add \r manually at the end – system does it automatically


Password question A question received from the device that is answered with the string
defined in “Password”field. Note that if DX-checkbox is checked from the
Misc. tab then this field is disabled and normal MML string is used.

Note! The match is checked from the beginning of the line


Password An answer that is sent to the device when the string defined in “Password
question”field is received. Note! This field is crypt before it is saved to the
.INI file

Do not add \r manually at the end – system does it automatically


Secondary A question received from the device that is answered with the string

Issue Date Page (Pages)


1.19-0 2/4/2008 36 (88)
HIT User's Guide

username question defined in “Secondary username”field.

Note! The match is checked from the beginning of the line.


Secondary login data can be used e.g. with Cisco routers.
Secondary An answer that is sent to the device when the string defined in “Secondary
username username question”field is received.

Do not add \r manually at the end – system does it automatically.


Secondary login data can be used e.g. with Cisco routers.
Secondary A question received from the device that is answered with the string
password question defined in “Secondary password”field.

Note! The match is checked from the beginning of the line.


Secondary login data can be used e.g. with Cisco routers.
Secondary An answer that is sent to the device when the string defined in “Password
password question”field is received. Note! This field is crypt before it is saved to the
.INI file

Do not add \r manually at the end – system does it automatically.


Secondary login data can be used e.g. with Cisco routers.
Something else… A question received from the device that is answered with string defined in
“… and Answer is… " field. This is meant to be used defining a question that
comes up during login sequence e.g. some kind of Y/N? situation.

Note! The match is checked from the beginning of the line


… and Answer is… An answer that is sent to the device when the string defined in “Something
else… ”field is received. E.g. Y\r for Y/N? question.

Note! You have to add \r manually if needed


Something else A question2 received from the device that is answered with string defined
2… in “… and Answer is… " field. This is meant to be used defining a question
that comes up during login sequence e.g. some kind of Y/N? situation.

Note! The match is checked from the beginning of the line


… and Answer 2 An answer2 that is sent to the device when the string defined in
is… “Something else… ”field is received. E.g. Y\r for Y/N? question.

Note! You have to add \r manually if needed


OK Save device settings to .INI-file and close dialogue.

NOTE! All those question/answer pairs ARE triggered whenever there is a match even it is not during
login sequence.

NOTE! The following rules are used to determine which login string (primary or secondary) should be
compared:
1. If username questions (contents of “Username question” and “Secondary username
question”) are identical; use primary login data at the first login time. After that use
secondary login data (i.e. try to match with it).

Issue Date Page (Pages)


1.19-0 2/4/2008 37 (88)
HIT User's Guide

2. If username question are not identical, try at the first primary and then secondary login
data.

3. The login data has to be used in pairs (username/password):

4. If username question are not identical and one of the username question has been
matched before, match with the corresponding password question. However, if primary
password question has already matched, use secondary login data.

Field Description
Resurrection/ Specify what control character(s) to send to a device when the device's prompt
revivals is not detected. The resurrection codes are sent when the timeout for the device
occurs. The format is: CTRL-<char>. For example:
CTRL-C sends 0x03 to the device.
CTRL-Y sends 0x1A to the device, chr(25)
ESC sends the escape-character 0x1B) to the device.
NULL sends null-character (0x00) to the device.
0x?? where ?? is two digit number, sends the character corresponding to the
hexadecimal number to the device.

Codes can be combined into one revival string by linking revival characters with

Issue Date Page (Pages)


1.19-0 2/4/2008 38 (88)
HIT User's Guide

a comma. For example string CTRL-C,CTRL-Y sends both (0x03 and 0x1A)
characters in succession.
OK Save device settings to .INI-file and close dialogue.

Field Description
Font/Name Face name of the selected font.
Font/Style Style of the selected font.
Font/Size Size of the selected font.
Font/Fonts-button Opens font selecting dialog.
Font/Scale Font If this option is selected font size is scaled so that 24 lines fit to window.
Screen buffer Number of lines in terminal window screen buffer.
Force Caps Forces capital letters regardless of the keyboard Caps Lock state.
Columns Sets screen width 80 or 132 characters
Autowrap If checked characters wrap to the next line automatically when the cursor
reaches the column value
Log/Name Name of the terminal log file.
Log/Enabled Terminal window logging ON/OFF
Log/Max size Maximum size of the terminal log file.
OK Save device settings to .INI-file and close dialogue.

Issue Date Page (Pages)


1.19-0 2/4/2008 39 (88)
HIT User's Guide

Field Description
Check correct Select whether or not echo checking is in use. This can be further specified
data transfer in the macro with the echocheck() function.
Suffix Define the character(s) appended to the end of every command transmitted
with the tx() function. Generally this is carriage return, [\r]. The suffix is not
applied to data sent with either the send() or answer() functions.
DX connection type, DX device / some other device type
Break char Character set that is send when user selects “Send Break”
Default key The default key value is used while communicating with the device and also
for reconnection (specifically, device() and deviceopen() use it). The goal is
to bring device to attention. (See Appendix 1: Default char usage for
example.)
The device() system function call can specify the second parameter for the
default key. If not used, the value from device configuration is used (also,
see the corresponding DEFAULTKEY value in INI file). If it is requested to
use device without the default char, it is possible to call
device("device_name", "").
For the DX family devices default char has to be '\r'. However, different
devices can use different default char.
OK Save device settings to .INI-file and close dialogue.

Issue Date Page (Pages)


1.19-0 2/4/2008 40 (88)
HIT User's Guide

Field Description
Use SSH If checked, SSH will be used with all connections of selected device
Port number Port number to be used with SSH connections. 22 by default.
Login method Specifies, what will be used for authentication.
Shared secrets = username and password
Keys = private key
SSH protocol SSH1 or SSH2
version
Private key file Path to file containing private key. Only relevant if “Keys”is selected as login
path method
Command line Extra plink/psftp command line parameters to use
parameters Append = parameters will be appended to those specified by GUI controls
Override = if selected, SSH client will be simply run with the specified
parameter string. The string MUST contain login information, since settings
from “Login”tab become irrelevant.

example: user@host –pw password –v -1


Advanced open advanced settings

Issue Date Page (Pages)


1.19-0 2/4/2008 41 (88)
HIT User's Guide

Field Description
Security level Specifies, how HIT will deal with PuTTy security warnings. These can occur
if
1) some change has been made in server configuration
2) we are trying to connect to computer pretending to be the server

Example:
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's key fingerprint is:
ssh-rsa 1024 98:22:49:00:55:96:e4:07:20:16:24:02:98:8a:2c:47
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)

HIGH = answer “Return”is sent


MEDIUM = answer “n”is sent
LOW = answer “y”is sent
NO ACTION = nothing is sent (NOTE: in macro, this will result into session
timeout and login failure, unless QA mechanism is used to answer question)
Logfile actions Specifies action taken if session logfile already exists (this only applies to
saved PuTTyt sessions)

Issue Date Page (Pages)


1.19-0 2/4/2008 42 (88)
HIT User's Guide

5.5.4 Device|Set Configuration|TCP/IP

The Device|Set Configuration|TCP/IP command is used to define a device connected by a TCP/IP link to the HIT
system. An example dialogue is given below:

The fields for the TCP/IP dialogue have the same basic inputs as the COM-devices (see previous
chapter). The port, baud rate and parity information has now been replaced by the network address (IP)
of the device.

Field Description
Name Define the logical name for the device; this name is used as a parameter in
for the device() function call.
IP address TCP/IP address of the remote end
OK Save device settings to .INI-file and close dialogue.

IP address can also contain port number, for example: [Link]:25


Default port number is 23 (= telnet port)

Issue Date Page (Pages)


1.19-0 2/4/2008 43 (88)
HIT User's Guide

5.6 Run Menu

The Run Menu provides commands to change execution mode, perform syntax check for a macro, start
macro, case list execution and method for user event calling.

The system also supports a generic Run key, F9, which starts the active window, Macro, List, or Batch.
The user must ensure the correct window is active before using the F9 key.

The Run commands are repeated by icons in the toolbar.

Syntax check verifies the syntactical correctness of a macro


Run executes
Stop stops execution (pause)
Stop list after stops list execution after the current macro
Reset resets macro execution
User Event calls user event defined in a macro currently executing

5.7 Debug Menu

As HIT macros become longer and more complex the user may be in situation that control of execution
is difficult. The HIT debugger allows the user to diagnose macro while executing. The debugger allows
user to halt execution and diagnose variables.

Issue Date Page (Pages)


1.19-0 2/4/2008 44 (88)
HIT User's Guide

5.7.1 Breakpoint

To support control of macro execution HIT provides breakpoints. Adding a breakpoint at a certain line
causes the HIT macro to halt at this line. From that point onwards the user may continue by stepping
(F12, icon in toolbar) or running (CTRL F9, icon in toolbar) again. Stepping is an old feature, and by
using it the user can continue execution line-by-line from the breakpoint.

To activate a breakpoint press key F5 or select menu item Toggle breakpoint under the Debug menu.
Notice that the background of the current line turns to red. This helps the user to identify possibly
useless breakpoints and then inactivate them by pressing F5 or through menu item Toggle breakpoints.
Inactivation can also be done through Clear all breakpoints under the Debug menu.

DON’T FORGET BREAKPOINTS IN YOUR MACRO, THE MACRO OR CASELIST WILL OBEDIENTLY
BE STALLED, EVEN WHEN THERE IS NOBODY AROUND TO PRESS THE CONTINUE BUTTON.

[Link] Examples

Note, a breakpoint can be set at any line but no checking is done whether that line is a statement or not.
Execution can be halted only at a statement line. Below are a few examples of statements and non
statements.

These are statements:

i = i*4;
str = getStr();
print(“This is a statement”);
;

These are not statements:

integer i;
string name = “James Brown”;
function my()
endfunction
do
#include “[Link]”
//empty line is not a statement
//srt=getStr();

The line turns red, but no actual breakpoint will occur on that line

5.7.2 Clear All Breakpoints

To ensure that no accidental execution halts occur, the user can select Clear all breakpoints from the
Debug menu. It may be so that one has a list of macros and it includes for example 20 macros, every
macro may consist of hundreds of code lines. Therefore useless breakpoints may remain and execution
may halt needlessly. To avoid this use clear all breakpoints.

The user can use clear all breakpoints before or during macro execution. It is recommended to use clear
all breakpoints unless the user does not recall all or does not need any breakpoints.

Issue Date Page (Pages)


1.19-0 2/4/2008 45 (88)
HIT User's Guide

5.7.3 Active Variables List

To diagnose different variables used in the macro the debugger provides active variables — list. As the
name indicates, the list is a dialog displaying variables that are currently activated. The list consists of
lines showing the type, name of the variable and its current value separated by “= “. If the variable is not
defined, the value field displays <uninitialized>. The value of a string variable is presented in quotes.

Usage

The Active variables — list can be activated only through menu item Active variables under Debug
menu. It can be inactivated through the system menu of its dialog (left corner) or by activating the list
first by clicking it and pressing the Esc-button.

5.7.4 Watch Properties

This dialog can be used to handpick variables into an own watch window.

Issue Date Page (Pages)


1.19-0 2/4/2008 46 (88)
HIT User's Guide

5.7.5 Call Stack

This window shows the function calls, and their arguments

5.8 Batch Queue Menu

The Batch Queue menu provides commands for handling the Batch Jobs Window; the commands allow
the user to create, modify, and execute jobs. When adding jobs or lists of jobs the user is presented with
a dialogue menu. The user name category is mandatory so that other users can know whose job is in the
queue. The Remove command in the menu can be used for both jobs and options.

In addition to jobs the user may insert options for the queue. The options are the same as those defined
for the Options Menu or for the case list #options directive. The assumption is that if a user wishes to
insert several jobs all having the same options it is more flexible to define the options in the queue rather
than in each case list. Options specified in the queue have precedence over options specified in the
Option menu. Options specified in the lists by the #options directive have the highest precedence. The
parameters of P-cases are resolved in following order

1. Options|Caselist (lowest precedence)


2. #options of case list
3. BatchqueueAdd options (highest precedence)

The default options are taken from the Options|Case Lists dialog. These defaults are the superseded
by the #options that the user places in the case list. If however the user adds options with the
Batchqueue|Add options, these are valid for the entire case list.

In addition to the Start command in the Batch Queue menu, the job queue can be started by SHIFT+F9,
or either F9 or the green arrow icon (play-button), both which start the active window.

Issue Date Page (Pages)


1.19-0 2/4/2008 47 (88)
HIT User's Guide

5.8.1 Add To Batch Queue

The dialogue is invoked by the BatchQueue|Add job command. The similar dialogue Add list of jobs is
invoked by the BatchQueue|Add list of jobs command. The dialogue is the same for both except the
first prompts for a macro file or case list, where the second prompts for a Batchjob list file (BJL). The
desired file can either be entered directly or browsed, where browsing works as in standard Windows
applications. The file and user name are mandatory.

The BJL-file is text file containing the filenames of the case lists (filenames may include path) to be
called. Additionally the menu lets the user configure the HIT environment as desired.

// [Link]
[Link]
[Link]

Issue Date Page (Pages)


1.19-0 2/4/2008 48 (88)
HIT User's Guide

5.8.2 Add Case List Options Dialogue

The Options|Add case list options command allows the user to define options to be defined for lists in the
Batch Queue. The options are applied to all lists having the same user name until a new options line is
encountered or the user name changes. The desired file can either be entered directly or browsed,
where browsing works as in standard Windows applications. The file and user name are mandatory.

5.8.3 Syntax Check All Jobs

Normally when pressing Syntax Check button in the tool bar or selecting similar item from menu only
pending items are checked but this menuitems checks all items in the queue.

5.8.4 Restart

Restart batch queue – executing starts from the first item in the queue.

5.8.5 Stop After

Stops batch queue execution after the currently running item.

5.8.6 Timer

Sets and cancels auto start for the batch queue execution.

Start time is within next 24 hours. If HIT is executing a macro or a list at the time a queue is scheduled to
start, start time is delayed automatically 15 minutes.

Issue Date Page (Pages)


1.19-0 2/4/2008 49 (88)
HIT User's Guide

5.9 Options Menu

The menu includes a Save command to save the desktop and a Load command to restore the desktop
to some previous setting. The user can store the desktop setting into the Windows NT Registry, with a
suitable name.

5.9.1 Options|Interpreter

The warning and error limit can be set. The include directory can also be specified from this dialog. The
include path can be is superseded by #incpath in the case list.

Issue Date Page (Pages)


1.19-0 2/4/2008 50 (88)
HIT User's Guide

5.9.2 Options|Environment

The Options|Environment command lets the user configure the desk top as desired. The default
settings are all items active except for “Print messages to file”and “Save environment on exit”.

The command “Highlight current line”causes the system to highlight the macro line being executed. The
execution speed is increased when the highlight is turned off, because the macro window need not be
update for each executed line.

The “Minimize before executing”is similar to Windows’“Run minimized”command. This options causes
the macros to execute displayed as icons, which eliminates the need to repaint the macro window.

The two checkboxes for messages allow the user to clear the Message Window before starting a macro
(default) and to save the contents of the window. It is advisable to clear the window because unless the
information is saved it is not required. If the user selects “Print messages to file”the system will save the
contents of the Message Window to [Link], where filename is the name of the macro being
executed. The file will be written to the working directory.

Issue Date Page (Pages)


1.19-0 2/4/2008 51 (88)
HIT User's Guide

Lastly the “Clear before execution”command causes the system to clear the Response window before
executing a macro (default). Choose this option if you want to preserve the output from the previous test
case on the response window.

5.9.3 Options|Toolbar

The user can define his/her own toolbar configuration using this option. The toolbar configuration dialog
shows all possible buttons on the left side and on the right side is current configuration. Only one button
per operation can exist in a toolbar except help and terminal buttons which are limited to 10 different
buttons. Another difference with help and terminal buttons are that to help button you must define the
help file which will be opened and to terminal button a device must be defined. The other buttons don’ t
require any additional definitions.

Note 1: Toolbar configuration is saved with the rest of the environment settings i.e. if you want to save it
you must select “Save On Exit”or save the environment settings using Options|Save
Environment.

Note 2: User can’ t define different toolbar configurations for interactive and fast mode thus the same
toolbar is used for both modes.

5.9.4 Options|Toolbox

This feature allows the user to create tool-buttons for often used activities:

• open terminal window


• open a macro or list window
• run a macro or list
• launch windows application using WinExec

Issue Date Page (Pages)


1.19-0 2/4/2008 52 (88)
HIT User's Guide

Selecting Options|Show Toolbox makes the toolbox visible

5.9.5 Options|Server

HIT server can be started at runtime using this option. The server can be listening either user defined
port using the telnet protocol or modem (datacard) connected to serial port.

Note: If the server is running “Start Server”button is changed to “Stop Server”.

5.9.6 Options|Windows Defaults

Windows defaults option is used for defining default font settings for the window types that can exist
more than once.

Issue Date Page (Pages)


1.19-0 2/4/2008 53 (88)
HIT User's Guide

5.9.7 Options|Load/Save Environment

Environment settings can be saved for the further use and loaded with these options. There can be
several different configurations saved and the user can select which one he/she wants to use by
selecting the name of the configuration from the load-dialog. The settings are saved to the registry under
HKEY_CURRENT_USER/Software/NTC/HIT2.

Note: Do not edit these settings from registry unless you are absolutely sure what you are doing.

Issue Date Page (Pages)


1.19-0 2/4/2008 54 (88)
HIT User's Guide

5.10 Window Menu

The Window menu lets the user Tile or Cascade the desk top. Furthermore the user can choose the
active window. If the user has opened windows to devices though the Device|Connect menu, those
terminal windows are displayed in the list of windows.

The F8 key is a shortcut for Arrange Windows. The child windows are arranged within frame window
using predefined settings.

5.11 Help Menu

The Help menu access the HIT help database. The menu also has the About command containing
version information.

5.11.1 About

This command shows the version of the HIT program.

5.11.2 HIT Help

This selection calls the help information for the HIT system and macro language.

Help menu File Description


Debugger Commands DEB_CMD.HLP Service Terminal
MSC Commands MSC_CMD.HLP MML help for MSC (if available)

Issue Date Page (Pages)


1.19-0 2/4/2008 55 (88)
HIT User's Guide

HLR Commands HLR_CMD.HLP MML help for HLR (if available)


Generator Commands GEN_CMD.HLP GSM traffic generator help (if available)
BSC Commands BSC_CMD.HLP MML help for BSC (if available)

These help-files are compiled by running the HIT2/EXAMPLES/CMDHELP macros on a generic


laboratory switch with all MML-options turned on. The log files are post processed with the
[Link] tool and compiled with [Link] help compiler

Issue Date Page (Pages)


1.19-0 2/4/2008 56 (88)
HIT User's Guide

6. HIT TOOLBAR

The toolbar contains a series of icons representing frequently used keystrokes, menu operations, or
mouse operations. The icons are invoked by single clicking them with the mouse.

The icons are defined for only certain windows; if the active window does not support the icon’
s
operation the icon is darkened. The complete (default) toolbar is shown below.

Note: The toolbar is not fixed to top of the window. It can also be located to the other sides or it can
even be floating around where-ever the user wants to put it.

6.1 Create New File Icon

Create a new macro, case list or text file.

6.2 Open File Icon

The Open icon can be used to open a macro. A new window is created for the new file. The icon is a
shortcut for commands in the File menu.

Issue Date Page (Pages)


1.19-0 2/4/2008 57 (88)
HIT User's Guide

6.3 Replace File Icon

If the user does not want multiple windows open, one method to avoid them is by using the Replace
icon. In contrast to the Open Macro and Open List icons, this icon opens a file and replaces the file in the
current window with the new file. For instance if the user has file [Link] open in the Macro window
and with the Replace File icon opens file ”[Link]”, file [Link] will be closed and ”[Link]”
installed in the Macro Window. The same functionality is provided for lists.

6.4 Save Icon

The Save icon saves either the active macro window or the active list window. If the text of the open
file has not been changed the icon is darkened. When a change occurs the icon is lit to remind the user
to save the changed file.

Note: the system automatically saves changed macros and lists before running or syntax checking.

The icon is a shortcut for commands in the File menu. If the macro or list is new the icon presents the
user with a dialogue menu to name (Save As) the new file before saving.

6.5 Undo Icon

The undo functionality allows to user to remove unwanted keystrokes and mouse actions. It is also
represented by key sequence, ALT+BACKSPACE.

6.6 Cut Icon

The Cut icon cuts highlighted text from the active macro or list window and copies it to the
Clipboard. The icon is a shortcut for commands in the Edit menu.

Issue Date Page (Pages)


1.19-0 2/4/2008 58 (88)
HIT User's Guide

6.7 Copy Icon

The Copy icon copies highlighted text from the active macro or list window to the Clipboard. The
source text is unaffected. The icon is a shortcut for commands in the Edit menu.

6.8 Paste Icon

The Paste icon copies text from the Clipboard to the current cursor position in the active macro or
list window. The icon is a shortcut for commands in the Edit menu.

6.9 Search Icon

The Search icon presents the user with a dialogue prompting for search information. The icon is
defined for the macro and list windows. The icon is a shortcut for commands in the Search menu.
Search can be done forward, backward, from cursor, from end of file, or from start of file.

6.10 Search and Replace Icon

The Search and Replace icon presents the user with a dialogue prompting for search and replace
information. The icon is defined for the macro and list windows. The icon is a shortcut for commands in
the Search menu. Search can be done forward, backward, from cursor, from end of file, or from start of
file; replacement can be done singly or for all occurrences of the item.

Issue Date Page (Pages)


1.19-0 2/4/2008 59 (88)
HIT User's Guide

6.11 Search Again Icon

The Search Again icon causes the system to search forward (or backward if this was previous
direction) for the current search item. If there was no previous search string, the icon remains grayed.

6.12 Interactive / Fast Mode

Toggle between the two execution modes. In fast mode the highlight info and screen update is
turned off, in order to increase execution speed.

6.13 Syntax Check Icon

The Syntax Check icon parses the macro in the macro window or all macros called from the list
window and verifies the syntactical correctness. The icon is a shortcut for commands in the Run menu.

The system automatically saves the macro and list files before parsing them.

6.14 Run Icon

The Run icon causes the active window, either Macro, List, or Batch to be executed. The icon is a
shortcut for commands in the Run menu and is also represented by the F9 function key. In addition to
Run, the user can also debug the macro by repeated Step Through / Step Over operations.

The system automatically saves the macro and list files before running them.

6.15 Stop Icon

The Stop icon causes the system to indefinitely suspend macro execution until either the Run icon is
clicked again or either the Run or Step Through operations— via menu, function key, or icon— are

Issue Date Page (Pages)


1.19-0 2/4/2008 60 (88)
HIT User's Guide

invoked. Execution resumes from the point where it was paused. The user can also invoke the Reset
icon, but that terminates macro execution.

6.16 Reset Icon

The Reset icon causes the system to immediately terminate macro execution. If the macro is part of
a list or batch job that too is terminated.

6.17 Run To Next ‘transmit’Command

Execute current macro, until next tx or send statement occurs.

6.18 Run To Cursor

Execute the current macro (or included file), stopping at cursor location

6.19 Skip Next Command

If the execution is halted on a tx or send command. The user can choose to skip the command
sending.

6.20 Jump To User Defined Step

Start macro execution on given step. Can also interrupt running macro and cause jump to new
location. This is button is not anymore in toolbar by default, but it can be added there via
Options|Toolbar.

6.21 Step Over

Single step macro, with exception of user defined function calls. Macro statements inside functions
are executed in fast mode (no highlight). After function statements are executed the Step Over remains
on the same statement, waiting for next Step, Run or Stop command.

6.22 Step Trough / Trace Into

The Step Through icon allows the user to execute the macro one line at a time. Used in conjunction
with the “highlight current line”command from the Option|Environment menu the user can easily trace
the progression of a macro. The icon is a shortcut for commands in the Run menu and is also
represented by the F12 function key. During execution time the user can alternate between the Run,
Step Through and Pause Operations. The user can also invoke the Stop icon, but that terminates macro
execution.

The system automatically saves the macro and list files before stepping them.

Issue Date Page (Pages)


1.19-0 2/4/2008 61 (88)
HIT User's Guide

7. SOFTWARE UPGRADE FEATURES

The software upgrade features are merged into the HIT tool from the previously used SOUP tool. These
features include

• project files
• extended control of macro-execution (step, phase, goto)
• extended error recovery
• event handlers
• exception traceability thru strict project mode.
• info window, with additional macro description
• editing of tx-commands, skip tx, etc.
• macro state saving and loading

7.1 Project Files

Project file contains control information of macro and related additional files. Project file is needed if user wants to use
controlled macro execution (e.g. release upgrade procedure). Project file name extension is HPR.

Allowed keywords in project file are:


Keyword Description
// Comment texts
#MACRO Name of macro file
#STRICT Enforces strictly controlled execution mode on
#CUSTOMER Customer information
#SITE Site information
#NET Network element information
#OLD_SW Previous software version
#NEW_SW New software version
#INFOFILE Additional information files
#C_NBR Cost number
#MASIVER MASI tool version information
#FSIVER Instruction version information
#MAC MASI macro name and version information

Example:
//
// [Link] — A project example
//

// Enforce stricly controlled project


#STRICT

// Management information
#MASIVER “@(#)MID: [Link] 2.9-0 96/08/21”
#FSIVER “[Link] 7.12-14”
#MAC “MASI_XX.MAC” “1.2-0”
#MAC “MASI_YY.MAC” “1.2-1”

// Related macro

Issue Date Page (Pages)


1.19-0 2/4/2008 62 (88)
HIT User's Guide

#MACRO “[Link]”

// SW upgrade specific info


#CUSTOMER “Special Customer”
#SITE “London”
#C_NBR “36781”
#NET “MSC”
#OLD_SW “6.34-99”
#NEW_SW “7.12-6”

// Related extra information files. Note format:


// #INFOFILE “<logical name>” “<physical file>”
#INFOFILE “INFOFILE 1” “[Link]”
#INFOFILE “INFOFILE 2” “[Link]”
#INFOFILE “INFOFILE 3” “[Link]”
#INFOFILE “INFOFILE 4” “[Link]”

An example of a project file ([Link]) is also found in the directory HIT2/EXAMPLES/TEL

7.1.1 Project Startup

When the example project above is executed following dialog is opened unless there were syntax errors
in the project file. If an error occurs it is informed in the message window.

The dialog shows the information mentioned in the projec file. If the project is strictly controlled (as is the
case in this example) user can view the project file by pressing “View”-button or active (start) the project
by pressing “Active”-button. If strict mode is not selected then “View”-button is replaced with “Edit”-button
which allows the user to edit the project file.

Issue Date Page (Pages)


1.19-0 2/4/2008 63 (88)
HIT User's Guide

When the user activates the project, macro file is compiled. If errors are found they are printed to the
message-window and project startup is terminated.

Next step in project execution is log file selecting.

When log file is acknowledged with OK-button, personnel dialog is opened (assuming STRICT mode is
on).

This dialog is intended to be filled with personnel information taking part of the ongoing software upgrade
process. All this information is also written to the log file.

When personnel dialog is acknowledged with OK-button, project macro is ready to run.

Issue Date Page (Pages)


1.19-0 2/4/2008 64 (88)
HIT User's Guide

Note that three new items (“Project Personnel...”, “Project Information...”and “Infofiles”) are added to the
View-menu.

7.1.2 STRICT Mode Restrictions

If the project is strictly controlled i.e. #STRICT keyword is defined in the project, then there are some restrictions and
additional requirements during macro execution.

• The macro file belonging to the project is read-only

• Deviation from the upgrade procedure requires explanation

− Goto step
− Skipping transmit-command
− User Event-call
− Variable value change (Active variables dialog)
− Editing command before transmit
− Terminal window opening
• Resetting macro is not allowed

• If prompt is not found or command transmit fails then execution is stopped

• Additional log writings (tags) during execution for easier traceability if the execution is checked from the log later.

• Following options are not allowed to be changed

− error recovery
− messages to file
− cancel at messagebox stops execution
− trace infos to the log
− promptchecking (permanently set to BOTH)
− automatic state saving

Issue Date Page (Pages)


1.19-0 2/4/2008 65 (88)
HIT User's Guide

7.2 Event Handlers

The event handlers allow the user to add exception handling capabilities into the macro. The event
handler can for instance react to error messages that occur during macro execution. An example of an
event handler is in the directory HIT2/EXAMPLES/TEL

//
// ev_resp.tel — Response event demo
//

string resLine;

// Define Response Event


defevent RESPONSE
id: “GlobalResponseEvent”;
respat: “’/***’”;
resline: resLine;
call: ResponseEventHandler( resLine );
enddefevent

handler ResponseEventHandler( string line )


messagebox(strprint(“Error was:\r\n%s\r\n\r\nPress OK to continue macro.”,
line),strprint( “Response event handler \”%s\” triggered”,
_FUNCTION ));
endhandler

phase Phase1
step step1
“This macro will enter erronous MML command to the exhange.”
“Command will produce an error message captured by the response”
“Event handler”

string unit = “CM”;

device( “ttdbench” );
tx( “ZUSIX;” );
tx( “ZUSI:%s;”, unit );

endstep
endphase

7.3 Error Recovery

This feature allows the user to do corrective actions, without the need to restart the macro. This feature
is used when the macro contains large groups of commands, and restart from the position where the
macro was interrupted is difficult. Some repairs can be made on the fly, for instance

• adding a new device() which is requested by the macro


• correcting/ignoring a division by zero
• handling uninitialized variables, using additional info provided by info window

Issue Date Page (Pages)


1.19-0 2/4/2008 66 (88)
HIT User's Guide

• invalid system function parameters

The error recovery option can be selected from the Options|Interpreter

7.4 State Saving/Loading

The macro execution state can be saved any time the macro is in stopped state (File|Save State), and
the saved state can be restored (File|Load State) when macro is either in stopped state or no macro is
being executed. The saved information contains complete execution state, including things like variable
values, calls stack and log positions.

In strict project mode state is automatically saved at the beginning of each called step and function. In
other than strict projects, the state saving option can be selected from the Options|Interpreter.

State saving generates following files:


File extension Description
*.HSF Interpreter state file (execution point, variable values etc.)
*.HSB Backup of interpreter state file
*.HCF Interpreter code file
*.HIS IDE state file (log, file, device, options etc. info)
*.HIB Backup of IDE state file

If the main files (.HSF, .HIS) are corrupted, which might happen if power failure occurs while file writing
is ongoing, backup files can be taken in use by renaming .HSB as .HSF and .HIB as .HIS.

Issue Date Page (Pages)


1.19-0 2/4/2008 67 (88)
HIT User's Guide

8. USE OF DLL AND DDE

8.1 Dynamic Link Libraries, DLL

The macro language allows the user to create elaborate test macros. The built-in functions of the HIT
macro language can also be extended with external functions from Windows DLLs.

HIT provide following system functions


Function Description
dlldw Executes specified DLL function; returns a DWORD value
dllload Load the specified DLL
dllfunction Execute the specified DLL function
dllfree Release the specified DLL from memory
dllw Executes specified DLL function; returns a WORD value

The HIT package provides the following DLLs


Library Description
[Link] Hexadecimal conversion library
[Link] HIT Custom Dialog Box library

Example macro:

function main()
string s,libname,MBOX=”S=MsgBox(S,S,S,S)”,Pas=”Pascal”;
string a=”Title”,b=”Which is better?”;
string c=”apple|banana|no comments”;
integer hlib;

libname=strprint(“%s%s”,getexedir(),”[Link]”);
print(“library %s\n”,libname);
hlib=dllload(libname);
if(hlib==0)
print(“library ‘%s’ — load failed\n”,libname);
abort(0,libname);
endif
s=dllfunction(hlib,”S=VersionString()”,Pas);
print(“version: %s\n”,s);
s=dllfunction(hlib,MBOX,Pas,”DIALOG_3”,a,b,c);
print(“answer: %s\n”,s);
dllfree(hlib);
endfunction

// library D:\Apps\HIT21\SYSTEM\[Link]
// version: @(#)MID: [Link] 1.5-0 97/01/08
// answer: apple

Issue Date Page (Pages)


1.19-0 2/4/2008 68 (88)
HIT User's Guide

The user can also pick functions from the Windows API libraries
Library some interesting functions
[Link] WinHelp
FindWindow
SetActiveWindow
GetTopWindow
GetActiveWindow
ShowWindow
FlashWindow
CloseWindow
DestroyWindow
SwitchToThisWindow
SetWindowText
SetWindowPos
MessageBox
MessageBeep
SendMessage
PostMessage
[Link] _lopen
_lread
_lwrite
_lclose
GetTempFilename
GetTempDrive
GetVersion
GetExeVersion
WritePrivateProfileString
WriteProfileString
GetPrivateProfileString
GetProfileString
GetVersion
[Link] FindEcecutable
ShellExecute
RegCreateKey
RegOpenKey
RegEnumKey
RegSetValue
RegQueryValue
RegCloseKey
RegDeleteKey
FindEnvironmentString
DoEnvironmentSubst

8.2 Dynamic Data Exchange, DDE

HIT can communicate with other Windows applications using the DDE interface. Most often HIT is used
together with Microsoft Excel. Using DDE the users can create HIT macros that read data from
spreadsheets using the dderequest call. Alternatively macros can write to the spreadsheet using the
ddedata-call.

Function Description
ddeconnect Connects to a Service via DDE
ddedisconnect Disconnects from a service realized by DDE connection
ddecommand Issues a command to another application
ddedata Sends data to another application
dderequest Requests data from another application

Issue Date Page (Pages)


1.19-0 2/4/2008 69 (88)
HIT User's Guide

Launch of the Excel application is supported thru the [Link] library macro

//
// [Link] — DDE example, read excel sheet
//
// %MID% , SATK/HITMACRO
//
#include <[Link]>

function read_Excel_sheet()
string cmd,sheet;
_SHA_RunExcel();
cmd=strprint(“[Open(\”%s%s\”)]”,getexedir(),”HIT_DLL.XLS”);
_SHA_ExcelCommand(cmd,10);
sheet=_SHA_GetFirstExcelTopic();
print(“\nsheet=’%s’\n\n”,sheet);
_SHA_ShowExcelSheet(sheet,”R1C1-R4C4”,”2,5”,17);
endfunction

Issue Date Page (Pages)


1.19-0 2/4/2008 70 (88)
HIT User's Guide

9. MISCELLANEOUS HIT INFO

9.1 Function Keys

The functions keys are assigned in HIT as follows.

Function Description
Key
F1 Invoke HIT help for the token at the current character position.
F2 Word completion
CTRL-F2 keyword completion
F3 Search again (forward/backward)
F4 Not defined
F5 set breakpoint
CTRL-F5 add watch
F6 Not defined
F7 Not defined
F8 Arrange windows
F9 Run
SHIFT-F9 Send Next
ALT-F9 Goto Step
CTRL-F9 Skip
F10 Step through the Macro Window
SHIFT-F10 send break character
ALT-F10 (not assigned)
CTRL-F10 reserved key, selects application menu
F11 Reset
F12 Step Over
SHIFT-F12 Trace Into
ALT-F12 User Function
CTRL-F12 Run To Cursor

9.2 Command Line

Following command line options are available

Option Description
<filename> Execute a .HIT, .LST or .BJL file. Automatic execution, where HIT
performs the file without additional prompting, is default usage.
If <filename> is a directory the HIT automatically opens a file-open
dialog at the startup pointing to that directory.
/C<=output file> Just syntax check defined macro, list or batchqueue and if output file is
defined prints messages (content of the Messages window) into it. Use
also /X option if you want that HIT exits after the checking is done
/E=<desktop name> Load desktop (environment) settings
/I=<ini filename> use other INI-file instead of the default [Link]
/IP=<IP address> When HIT loads the devices from .INI it searches device which has the
defined IP-address and replaces its device name with “NetAct-NE”.

Issue Date Page (Pages)


1.19-0 2/4/2008 71 (88)
HIT User's Guide

Note! All devices which have the same name (“NetAct-NE”) defined in
the .INI are not loaded!
Note! By default defined address is added to log file extension.
/N Load a .HIT, .LST or .BJL file but do not execute it.
/O=<path> Define a default output directory
/PW=<password> Define a password which is used with every device (overwrites all
passwords defined in .INI)
/S HIT Server ENABLED
/T TTCN mode ENABLED
/U Define username for BatchQueue
/UN=<username> Define a username which is used with every device (overwrites all
usernames defined in .INI)
/X Exit the HIT after the macro is executed

Example:

C:\Program Files\HIT2\SYSTEM\[Link] [Link] /S

The path to the file the file may be defined as follows:

Explicit path: C:\M7\TEST\[Link]


Path in the working directory: [Link]
Path relative to the working directory: ..\SUBDIR\[Link]

9.3 Embedded MML-commands

The HIT 2.x allows the user to define MML-commands without the tx-statements. This notation provides
a compact and readable script.

//
// embedded MML-commands
//
function main()
string unit=”OMU”;
device(“MMLMSC”);
tx(“ZUSI:OMU;”); // “classic tx”
ZUSI:OMU; // “SOUP style”
ZUSI:#unit#; // ..with arguments
endfunction

NOTE: the command must terminate with semicolon.

Issue Date Page (Pages)


1.19-0 2/4/2008 72 (88)
HIT User's Guide

10. REMOTE USAGE OF HIT

Remote usage means executing HIT from elsewhere than the user interface. HIT supports two methods
for this:

• telnet/modem server
• TTCN server

The HIT can be started as a server by specifying the command line option /S or /T for the HIT2 icon. The
TTCN server configuration is not supported in the Customer Tool Package.

10.1 HIT Server

HIT can operate as a TCP/IP or modem server. This means that a remote application can connect to the
HIT PC via TCP/IP or modem and request that the HIT workstation perform a function. In order for HIT
to operate as a server the /S flag can be set in the command line or the server can be started from
Options|Server menu.

The remote user can then establish a telnet connection to HIT. The HIT PC will output to the message
window information about the client. The client will be presented a terminal window supporting the
following commands:

HIT2> ?

? or H . . . . . . Help
AV <variable> . . . Active Variables (all or only single variable)
DC devicename . . . Device Connect
ctrl-K . . . . . . device Disconnect
DL . . . . . . . . Device List
QA macro/caselist . Add macro or caselist to batchQueue
QB BJL-file . . . . add Batchjoblistfile to batchQueue
QD number . . . . . Delete job (check the number with QJ or QP)
QJ . . . . . . . . show all Jobs in batchQueue
QO options . . . . Add listOptions to batchQueue
QP . . . . . . . . show Pending jobs in batchQueue
QS . . . . . . . . Start batchQueue
QR . . . . . . . . Restart batchQueue
RB BJL-file . . . . Run Batchjoblistfile
RL caselistfile . . Run caseList
RM macrofile . . . Run Macro
RV . . . . . . . . start Response View (ctrl-K stops)
TF filename . . . . Type file
WM messagestring . Write Message to server message-window
S . . . . . . . . Stop execution
R . . . . . . . . Reset execution
C . . . . . . . . Continue execution
QUIT. . . . . . . . Quit

Issue Date Page (Pages)


1.19-0 2/4/2008 73 (88)
HIT User's Guide

10.2 TTCN Configuration

The TTCN configuration is not supported in the Customer Tool package. The HIT server interacts with a
CVOPS client application running in a SUN-workstation.

TTCN testing presents special considerations for the HIT system. In TTCN both HIT and the TTCN test
suite can be the test controller. If HIT is the controller the configuration with HIT having client capabilities
works, but if TTCN is to be the test controller and should have access capability to HIT during test suite
execution, then the HIT client/server configuration must be used. The following schematic shows TTCN
controlling HIT with communications routed through a CVOPS application. NOTE: this solution requires
that the HIT application is running in TTCN server mode in the recipient PC.

SUN/TTCN PC/HIT

TTCN VTASK

HIT EXECUTOR
TCAP VTASK MMLVTASK
CALLED BY
TCP/IP SOCKET
SCCP VTASK
HITd Server

MTP IF

LINK TCP/IP TCP/IP


SERVER

THIN ETHERNET
RS-232

XNET PC
MTP TELEWORK SERVER

TCP

IP MTP 3
MTP 2 MSC VLR/HLR
ETHERNET
CARD MTP 1
PCM
PRI/AT CARD

Issue Date Page (Pages)


1.19-0 2/4/2008 74 (88)
HIT User's Guide

11. MESSAGE MONITORING

The message monitoring is used for debugging the message interchange between the process families
in the DX. Typical monitoring data looks like this:
MONITORING TIME: 1994-01-13 12:29:50.47
RECEIVED BY: 0132 0000 00
MONITORED MESSAGE: 0055 4C41 010F 000D 00 09 0040 7044 0053
00 00 00 00 31 4D 32 01 00 00 00 00 00 00 00 00 00 83 90 03 14 70 01 07 40
10 02 02 04 02 42 FE 04 04 43 50 00 FE 0F 1C 00 1A 57 05 05 01 00 01 00 11
17 10 05 24 71 03 00 00 00 08 29 43 33 00 00 00 00 05 00

MONITORING TIME: 1994-01-13 12:29:50.47


RECEIVED BY: 0132 001F 00
MONITORED MESSAGE: 0023 C000 0132 0000 00 01 0000 6836 0037
01 1F 00 00 78 69 00 00 00 00 00 00 41 40 0F 01 0D 00 00

MONITORING TIME: 1994-01-13 12:29:50.47


SENT BY: 0132 0000 00
MONITORED MESSAGE: 0055 C000 0132 001F 00 11 0000 7044 0000
00 00 00 00 31 4D 32 01 00 00 00 00 00 00 00 00 00 83 90 03 14 70 01 07 40
10 02 02 04 02 42 FE 04 04 43 50 00 FE 0F 1C 00 1A 57 05 05 01 00 01 00 11
17 10 05 24 71 03 00 00 00 08 29 43 33 00 00 00 00 05 00

In addition to the message monitoring data, the computer log often contains interesting information.
HIT supports collecting of message monitoring using the case list option /M.

11.1 Setting Monitoring

function SetMon(string process)


string OldPrompt;

device(“Kantokoski”);
tx(“ZRD”);
//Clear remote exisiting sessions, if any
pause(2,”Disconnecting remote session”);
tx(“ZRS:00,BF”);
//Make remote session to unit in which monitoring will be done.
//The unit is a good thing to parameterise.
Pause(2,”Connecting to remote session”);
tx(“ZOQS:G40.0,FFFF”); //Define memory usage
OldPrompt =promptcheck(BEFORE);
//Set promptcheck to BEFORE because the following command does not
//return a prompt
tx(“ZOQB:%s,FFFF,FF,FFFF,FFFF,FFFF,FFFF,FFFF,FFFF,FFFF,FF”,process);

//Set monitoring
pause(2,”Setting monitoring”);
send(chr(0));
//End the remote session. Monitoring remains active
promptcheck(OldPrompt);
endfunction

Issue Date Page (Pages)


1.19-0 2/4/2008 75 (88)
HIT User's Guide

11.2 Gathering Monitoring

function GetMon(string process)


device(“Kantokoski”);
tx(“ZRD”); //Clear remote exisiting sessions, if any
pause(2,”Disconnect remote session”);

// Make remote session to unit in which monitoring will be done.


Tx(“ZRS:00,BF”);
pause(2,”Connecting remote session”);

tx (“ZGSC:,%s;”, process); //Show write to logs


tx (“ZSLP;”); //check for memory protection errors
tx ( “ZOQS:G40.0,FFFF;” ); // Define memory usage.
Tx (“ZOQM;”); //Gather monitorng
tx (“ZGC;”); //Clear logs
tx (“ZE;”); // End session
endfunction

11.3 The ZOE Monitoring

HIT contains two list options to support this ZOE service terminal commands monitoring.

/MSCMON option for MSC monitoring


/HLRMON for HLR monitoring

Syntax:
#options /MSCMON=”monitor_options”/HLRMON=”monitor_options”

Where the monitor_options defines monitored units, monitoring points and monitoring criteria. The unit
may be either a logical name like CM or unit number like 04. HIT sets monitoring for all matching units,
e.g. BSU may match to BSU-1 and BSU-2 units.

Monitoring point is S (send), R (receive), A (arrive) or a combination of these. SR monitors both


message sendings and receivings.

Criteria define which messages are included in the monitoring. The criteria consist of logical operators
and message header fields. Typically it defines the monitored families, but it may contain other
conditions too. See the ZOEC command help for details about monitoring points and criteria.

Example1:
#options /MSCMON=”BSU:[SR:FAM=132,134]
• Monitor families 132 and 134 in all MSC BSU units (in WO-EX state).

Example2:
#options /HLRMON=”CCSU:[SR:FAM=127],STU:[SR:FAM=178]”

• Monitor family 127 in HLR CCSU units and family 178 in HLR STU units.

Example3:
#options /MSCMON=”BSU:[SRLFAM=132) AND_NOT(NUM=0,1)]”

Issue Date Page (Pages)


1.19-0 2/4/2008 76 (88)
HIT User's Guide

• Monitor family 132 in MSC BSU units, ignore message numbers 0 and 1.

These list options generate calls to __set_async_monitoring() and __get_async_monitoring() functions in


[Link] macro. The functions use ZOE.. commands to set and get monitoring.

Issue Date Page (Pages)


1.19-0 2/4/2008 77 (88)
HIT User's Guide

12. TESTING TIPS

The HIT macro language resembles the C programming language, in fact in several cases C functions
and ideas are copied shamelessly. This is not a mistake; as C is well known to potential HIT user it is
hoped that HIT’s similarity to C will help users easily learn and apply the macro language.

Because test cases are becoming more complex with each successive package more time should be
devoted to test case writing. Specifically a test case should be considered a program and as such care
should be taken while writing. Through functions and libraries the HIT system should allow the user to
make high quality macros. This section is not intended as a style guide for HIT macros. Instead it
simply highlights some items to consider while writing macros and lists. The HIT system does not
impose any guidelines upon macro style; their lack, however, does not prevent the user from applying
basic programming rules, name the macro should be sequence of modular function calls permitting easy
updating and modification.

The HIT user is urged to thoroughly read the HIT macro language specification.

12.1 Notes for C users

The HIT language is very “C-like”, nonetheless differences exist with some of the more important items
mentioned below.

• The first function encountered is the main. The test execution language does not force the user to
declare a main.
• Functions are not prototyped.
• The language does not have pointers.
• Only string, integer, and float data types are supported.
• Only %c, %f, %s, %d, %x, and %X format specifiers are supported.
• Macros are translated, not compiled.
• String indexing begins at 1
• If the array is a “traditional array”, i.e. declared with a size indexing begins at 1
• Arrays can be declared without a size, those arrays are dynamically allocated and can be indexed by
both strings and numbers. The type of the array, however, defines the type of element stored.
• the argument passing same as ins C-language, default is pass-by-value

In the HIT language the classic “Hello World”example would be:

function FunctionName()
print(“Hello World!\n”);
endfunction

About function arguments


Arguments are passed to functions as pass-by-reference or pass-by value parameters.

Version BY-REF BY-VALUE default


HIT 2.x integer &x integer x; by value

Issue Date Page (Pages)


1.19-0 2/4/2008 78 (88)
HIT User's Guide

12.2 Writing Macros

A macro corresponds to a test case. The rough framework for a macro is the following:

/***************************************************************
*
* Header information detailing the macro and what package and feature is being
* tested. The test team could also appear.
***************************************************************/

/*************************************************************’*
* #include files for the macro. These files may contain such * items as system
constants used by the test team, such as
* IMSI numbers. Another use for #include files is function
* libraries. It is anticipated that each test team will
* develop functions designed for the teams individual needs.
*
* The HIT system makes a number of hidden #include calls when
* performing #options.
**************************************************************/

/**************************************************************
*
* public and constant variable definitions
**************************************************************/

/**************************************************************
*
* Macro script.
*
**************************************************************/

12.3 Style Guide

The style guide could be condensed into following rules

• Each macro should include maintenance information, author, revised by, etc.
• Identifier names for constants are written with CAPITAL name.
• Global variables and constants in macro must have suitable prefix
• Library macros are well documented, and version controlled
• Library functions must have a library prefix
• Global identifiers in the library macro must have a library prefix
• Global identifiers are named such, that they are unlikely to have the same name as a local
variable.
• Variables are given meaningful names, avoiding too long variable names

prefix used for


underscore global variable
g_ global variable
dbl-underscore library functions, in general
__CALLCHK prefix for the CALLCHK-library

Issue Date Page (Pages)


1.19-0 2/4/2008 79 (88)
HIT User's Guide

Some often used variable names

identifier used for


i, j, k loop-variable
n, cnt, count counter
nr, nbr, number number
ix, index index
d, x number
c, ch, chr character
s, str string
line, Line textline
tbl, table table

12.4 Functions

In C every program except for header files requires a main function. HIT extends this idea; every macro
except for header files requires a function. The function name can be whatever the user chooses; the
function itself must be prefaced with the keyword “function”and terminate with “endfunction”. (HIT does
not use C’ s curly brackets, instead end[keyword] is used— where keyword can be “if”, “while”, ”for”
“switch”or “function”.)

In the test execution language macros are comprised of functions. The following rules apply:

• The first function encountered by the parser is the “main”for the macro; the test language therefore,
does not require usage of “main”. But because the first function is the main for a program, all sub
functions must be written after the first.
• Functions do not have prototypes
• Function declarations must have the type of the parameters defined
• Arrays can be passed to functions. They can not, however, be returned
• Functions can be called recursively
• Functions can not contain other function declarations, they can, however, call other functions.
• Functions may have arguments
• Functions may not have varying amounts of arguments
• Functions may have a return value.
• Functions can have variables defined within the function block which are destroyed when the function
terminates
• All functions begin with the keyword “function”and end with keyword “endfunction”
• All function names must include parentheses, even if the function does not contain arguments.
Parentheses, (), are function indicators.
• If a function which returns a value is not called in an assignment statement, the return value is
destroyed by the system.

Pass by reference means that the called function may change the value of the variable used as
parameter for the function. This overrides the normal scope rules. A function using pass by reference
arguments is said to have a side-effect. Whether the side-effect is wanted or unwanted depends on the
situation. It is therefore recommended that call-by-reference arguments are carefully commented, so
possible misunderstandings can be avoided.

Issue Date Page (Pages)


1.19-0 2/4/2008 80 (88)
HIT User's Guide

To write a macro the user positions the cursor in the Macro window and start typing. When finished
Click the Save icon and complete the dialogue. Next click the Syntax check icon to debug the
macro, . After correcting errors click the Run icon to execute the macro, .

HIT parses and executes macros from top to bottom, the first function it encounters in the file will be the
“main”. The “main”function can, of course, call other functions. HIT does not have function prototyping;
the possible parameters and return value for a function are evaluated at run time. For example, to add a
function to the above macro printing “Hyvää Huomenta Suomi”, a possible solution would be:

Example, swap function, pass by reference:

function main()
integer a=5,b=6;
swap(a,b);
//Now a=6, b=5
endfunction

function swap(integer &x, integer &y)


integer temp;
temp=x; x=y; y=temp;
endfunction

Example, above example but pass by value:

function main()
integer a=5,b=6;
noswap(a,b);
//nothing changed, a=5, b=6
endfunction

function noswap(integer x, integer y)


integer temp;
// x=5,y=6
temp=x; x=y; y=temp;
// x=6,y=5
endfunction

Example, function returning a value:

function test()
string Unit, Mb;

ask(Unit,”Enter the DX unit you want to find”);

Issue Date Page (Pages)


1.19-0 2/4/2008 81 (88)
HIT User's Guide

//where ask() is a standard HIT library function

Mb = FindComputerUnit(Unit);
//Mb is given the message bus of the unit.
Print(“\nUnit %s in the WO-EX state has message bus\
address %s”,Mb);
endfunction

string function FindComputerUnit(string unit)


string line, address =””;

device(“OMU”);
tx(“ZLP:U,RCB”);
tx(“ZUSI:COMP”);
if(getline(line,” ‘%s’ AND ‘WO-EX’”, unit))
strscan(line, “%*s %s”, address);
else
print(“Working unit not found.”);
endif

return(address);
endfunction

/***************************************************************
* Print “Hello world!” and “Hyvää Huomenta Suomi” to
* the message Window.
*
**************************************************************/
function hello()
print(”Hello world!\n” );
SayHiToFinland();
endfunction

function SayHiToFinland()
print(“Hyvää Huomenta Suomi\n”);
endfunction

As mentioned above, functions can be given arguments. In the next example the function will be given a
number; if the number is even it prints one string, if odd another.

/***************************************************************
* Print “Hello world!” or “Hyvää Huomenta Suomi” to the
* message Window.
*
**************************************************************/
function hello()
print(“Hello world!\n”);
SayHiToFinland(rnd(1));
//rnd() is a HIT function returning a random number
//from 0 to the range, in this case from 0 to 1.
Endfunction

function SayHiToFinland(integer flag)

Issue Date Page (Pages)


1.19-0 2/4/2008 82 (88)
HIT User's Guide

if(flag)
print(”Hyvää Huomenta Suomi\n”);
else
print(”Hyvää Yötä Suomi\n”);
endif
endfunction

12.5 Writing Lists

The list is a module grouping together test cases. The user should write lists in such a manner that each
test case is self contained. This means that if a case should fail the macros in the list are designed in
such a manner that the case will not affect execution of the next case in the list. This way one bad case
will not spoil the whole test run, whether it is a single list or a batch.

Lists allow the user to parameterize macros. For example in the generator the basic call command is:
ZJSS:imsi,msisdn; By selecting the correct IMSI and MSISDN numbers the user can make internal,
external, PNP, or other call types. Obviously when a case is parameterized the <casename> option in
the list should be used to differentiate test results. Note that if a function requires external parameters
from the list the function can only be called from the List window, otherwise a parsing error will result.

When macro is called directly without the argument values supplied by the case list the parser will give a
runtime warning for an uninitialized value:

** runtime warning in file C:\HIT\[Link] line 5


using uninitialized variable x

In the example macro the variable x would normally receive its value from the calling list.

For example, the [Link] macro from above can be modified to say hello to the input country name.
Note how the output file is also changed with the <> notation. The function will be:

/***************************************************************
* Print “Hello” for the input country to the Message window.
*
***************************************************************/
function hello(country)
print(“Hello %s!\n”, country);
endfunction

The test case list will be:

E <finland> c:\test\macros\[Link]::hello(“Suomi”)
E <denmark> c:\test\macros\[Link]::hello(“Tanska”)
E <sweden> c:\test\macros\[Link]::hello(“Ruotsi”)

Issue Date Page (Pages)


1.19-0 2/4/2008 83 (88)
HIT User's Guide

13. LIBRARIES

The HIT language (TEL in HIT 2.0 and later releases) supports libraries, where the term “library”refers to
a set of user written functions made in the HIT language. Libraries should not be confused with the built
in HIT system functions. Libraries are good for information sharing; if a macro is written which provides
services that would be useful by many other testers then information about the macro should be
distributed permitting other users to use it.

Each test team is strongly encouraged to construct their own specific library functions for use by all
members of the team.

13.1 HIT System Libraries

The default libraries for the system are the macros handling case list options:

Library Description
[Link] message monitoring
[Link] charging tickets
[Link] statistics reports
[Link] hanging resources

Additional libraries

Library Description
MT_FUNCT.HIT module testing environment support
[Link] support for DDE & launching of Excel application
[Link] allow use of HIT 1.6 ask() function
[Link] run macros without connected device, by redefining device functions to
print statements

These library routines can be found in the HIT2/INCLUDE directory.

13.2 DLL-libraries

Three DLL-libraries are available in the HIT2/SYSTEM directory:

• [Link], hexadecimal conversion functions for module testing


• [Link], Custom Dialog box library

Documentation available in directory HIT2/DOC.


Example macros are found in HIT2/EXAMPLES directory.

Issue Date Page (Pages)


1.19-0 2/4/2008 84 (88)
HIT User's Guide

14. APPENDICES

Here you can find e.g. some examples (macros, communication with devices, … ).

14.1 Appendix 1: Default char usage

A simple macro:

function main()
device("DX");
tx("?");
logprint("OK");
endfunction

device log: hit macro:


function main()

ENTER USERNAME < device("DX");

SYSTEM
ENTER PASSWORD <
******
MSC DX220-LAB 1989-05-21 11:16:18

WELCOME TO THE DX 200 SERIES DIALOGUE

MAIN LEVEL COMMAND <___>


<
? tx("?");

MSC DX220-LAB 1989-05-21 11:16:19


MAIN LEVEL

? ..... DISPLAY MENU


A ..... ALARM SYSTEM ADMINISTRATION
C ..... ROUTING STATE ADMINISTRATION

Issue Date Page (Pages)


1.19-0 2/4/2008 85 (88)
HIT User's Guide

D ..... SYSTEM SUPPORT AND COMMUNICATION


E ..... CELLULAR RADIO NETWORK ADMINISTRATION
G ..... CHARGING ADMINISTRATION
I ..... I/O SYSTEM ADMINISTRATION
M ..... GSM SUBSCRIBER ADMINISTRATION
N ..... SS7 NETWORK ADMINISTRATION
O ..... SUPPLEMENTARY SS7 NETWORK ADMINISTRATION
Q ..... O&M NETWORK ADMINISTRATION
R ..... ROUTING ADMINISTRATION
S ..... SUBSCRIBER ADMINISTRATION
T ..... TRAFFIC ADMINISTRATION
U ..... UNIT ADMINISTRATION
W ..... SYSTEM CONFIGURATION ADMINISTRATION
Y ..... SYSTEM SUPERVISION
Z; .... END DIALOGUE/DESTINATION SELECTION (:)

MAIN LEVEL COMMAND <___>


<

TEST OK logprint("OK");
endfunction

Issue Date Page (Pages)


1.19-0 2/4/2008 86 (88)
HIT User's Guide

15. EXAMPLES DIRECTORY

Following subdirectories are found under the HIT2/EXAMPLES directory

Directory Description
DDE Excel spreadsheet example
TEL various example macros, demonstrating the new TEL-language

Issue Date Page (Pages)


1.19-0 2/4/2008 87 (88)
HIT User's Guide

16. VERSION HISTORY

Version Date Description


1.0-0 December 1994 Initial version
1.1-0 March 1995 Updated for release of HIT version 1.2 March, 1995.
Sections detailing multiplexer usage, multiple windows, and
libraries added.
1.2-0 August 1995 Updated for HIT version 1.3-2.
1.3-0 October 1995 Updated for HIT version 1.4-1
1.4-0 November 1996 Updated for HIT version 1.6-1 and 2.0-0
1.5-0 December 1996 Updated for HIT 2.1-b1
1.6-0 January 1997 Reviewed 2.1.-97, updated for HIT 2.1-0 release
1.7-0 January 1997 HIT 2.1-0 release 23.1.1997
1.8-0 March 1997 Updated for HIT 2.1-3 release
1.9-0 June 1997 Updated for HIT 2.1-4 release
1.10-0 November 1997 Updated for HIT 2.1-6 release
1.11-0 November 1997 Updated for HIT 2.2 release
1.12-0 October 1998 Updated for HIT 2.3 release
1.13-0 January 1999 Updated for HIT 2.3-x release
1.14-0 January 2000 Updated for HIT 2.4-x release
1.15-0 October 2000 Updated for HIT 2.4-3 release
1.16-0 January 2001 Updated for HIT 2.5-0 release
1.17-0 January 2005 Updated for HIT 2.7-0 release
1.18-0 May 2005 Updated for HIT 2.8-0 release
1.19-0 December 2005 Updated for HIT 2.8-1 release
1.20-0 March 2006 Updated for HIT 2.9 release
1.21-0 October 2007 Updated for HIT 2.10 release
1.22-0 December 2007 Updated for HIT 2.10 release: more details on new features
1.23-0 February 2008 Updated for HIT 2.10 release: Nokia Siemens Networks

Issue Date Page (Pages)


1.19-0 2/4/2008 88 (88)

You might also like