HIT 2.x User's Guide Overview
HIT 2.x User's Guide Overview
x
User's Guide
HIT User's Guide
DISCLAIMER
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.
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
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
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
The HIT installation requires approximately 10MB disk space, of which the documentation occupies
approximately 5MB.
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.
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:
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
2. SYSTEM CONFIGURATION
2.1 Desktop
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
Run to next ‘
transmit’command
Skip next ‘
transmit’command
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].
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 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 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
NOTE: when set to 1, you have to specify all the parameters, including
login details
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.
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.
|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
a) Unused variables
b) Possibly uninitialized variables
c) Possible incorrect assignments single equal sign inside if / while expression
a) target substring does not occur in the target line, as the user expected
b) input string is shorter than expected
a) user has not created the device from menu Device/Set Configuration
b) devicename incorrectly spelled
Echo errors
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
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.
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:
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.
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
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.
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.
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.
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.
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:
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 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.
Window Property
Macro Edit,Cut,Copy,Paste
List Edit,Cut,Copy,Paste
Response Copy
Messages Copy
Terminal Copy,Paste
4. CASE LISTS
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.
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
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.
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
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.
Syntax:
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).
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.
/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)
Example: mode=125
The E parameter means execute. If the list item is called with this parameter no options will be applied to
the case.
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
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:
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().
P C:\CASELIST\[Link]::main()
function main()
print(“Performing the test case.\n”);
endfunction
The case list options are intended to be used only on a laboratory switch, with no ongoing traffic.
[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
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.
5. HIT MENUS
The HIT menus provide a logical grouping of commands and procedures for control of the system
environment and macros.
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.
The Edit menu provides standard Windows editor commands. The Cut, Paste, Copy and Undo
commands also available as toolbar buttons
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.
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
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.
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.
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.
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.
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! 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).
2. If username question are not identical, try at the first primary and then secondary login
data.
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
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.
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.
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.
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)
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.
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.
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.
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.
i = i*4;
str = getStr();
print(“This is a statement”);
;
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
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.
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.
This dialog can be used to handpick variables into an own watch window.
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
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.
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]
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.
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.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.
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.
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.
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:
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.
Windows defaults option is used for defining default font settings for the window types that can exist
more than once.
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.
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.
The Help menu access the HIT help database. The menu also has the About command containing
version information.
5.11.1 About
This selection calls the help information for the HIT system and macro language.
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.
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.
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.
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.
The undo functionality allows to user to remove unwanted keystrokes and mouse actions. It is also
represented by key sequence, ALT+BACKSPACE.
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.
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.
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.
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.
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.
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.
Toggle between the two execution modes. In fast mode the highlight info and screen update is
turned off, in order to increase execution speed.
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.
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.
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
invoked. Execution resumes from the point where it was paused. The user can also invoke the Reset
icon, but that terminates macro execution.
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.
Execute the current macro (or included file), stopping at cursor location
If the execution is halted on a tx or send command. The user can choose to skip the command
sending.
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.
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.
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.
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
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.
Example:
//
// [Link] — A project example
//
// 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
#MACRO “[Link]”
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.
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.
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.
Note that three new items (“Project Personnel...”, “Project Information...”and “Infofiles”) are added to the
View-menu.
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.
− 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
• Additional log writings (tags) during execution for easier traceability if the execution is checked from the log later.
− error recovery
− messages to file
− cancel at messagebox stops execution
− trace infos to the log
− promptchecking (permanently set to BOTH)
− automatic state saving
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;
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”
device( “ttdbench” );
tx( “ZUSIX;” );
tx( “ZUSI:%s;”, unit );
endstep
endphase
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
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.
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.
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.
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
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
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
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
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
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”.
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:
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
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.
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
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
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
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
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.
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
HIT contains two list options to support this ZOE service terminal commands 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.
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)]”
• Monitor family 132 in MSC BSU units, ignore message numbers 0 and 1.
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.
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
function FunctionName()
print(“Hello World!\n”);
endfunction
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.
*
**************************************************************/
• 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
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.
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:
function main()
integer a=5,b=6;
swap(a,b);
//Now a=6, b=5
endfunction
function main()
integer a=5,b=6;
noswap(a,b);
//nothing changed, a=5, b=6
endfunction
function test()
string Unit, Mb;
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
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
if(flag)
print(”Hyvää Huomenta Suomi\n”);
else
print(”Hyvää Yötä Suomi\n”);
endif
endfunction
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:
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
E <finland> c:\test\macros\[Link]::hello(“Suomi”)
E <denmark> c:\test\macros\[Link]::hello(“Tanska”)
E <sweden> c:\test\macros\[Link]::hello(“Ruotsi”)
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.
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
13.2 DLL-libraries
14. APPENDICES
Here you can find e.g. some examples (macros, communication with devices, … ).
A simple macro:
function main()
device("DX");
tx("?");
logprint("OK");
endfunction
SYSTEM
ENTER PASSWORD <
******
MSC DX220-LAB 1989-05-21 11:16:18
TEST OK logprint("OK");
endfunction
Directory Description
DDE Excel spreadsheet example
TEL various example macros, demonstrating the new TEL-language