 |
Overview
The AS/400 Test Library for
Performix/TTY package extends the already impressive capabilities of Rational Software Corporation's Performix/TTY load test software to
provide unparalleled IBM AS/400 load testing capabilities.
By successfully integrating Performix/TTY
with the Star5250 terminal emulator from StarQuest
Connectivity, Network Pathways has created an exceptional load testing tool for
mainstream AS/400 applications deployed in a TCP/IP environment.
Features and Benefits
As an add-on to Performix/TTY, the AS/400 Test Library
provides the following additional features and benefits.
| Feature |
Benefit |
|
|
The waitINH function
provides reliable host synchronization in an environment where unpredictable
end-of-transmission strings make normal screen synchronization difficult; |
|
|
Provides
pre-written, documented & tested C code templates for many common application testing
requirements and speeds script development; |
|
|
Provides
pre-written, documented & tested C code templates for many common application testing
requirements and speeds script development; |
|
|
Allows host
application errors to be logged to a separate file including a snap-shot of the screen
image at the time of error, complete with host status line and error messages; |
|
|
Additional functions
provide many common methods for navigating host applications following paths, using
pop-up lists, pressing function keys, returning to menus, etc.; |
|
|
Robust error
recovery allows scripts to recover from application errors and to continue testing from
controlled restart points; |
- Time-out and Signal Handling
|
Provides reliable
detection and recovery from host time-out errors. |
- Simplified Workload Definition
|
The make_mix and
make_tab scripts greatly simplify the task of creating workload definition files. A
complex 500 user test can be easily described in a dozen lines which are accurately
translated into the 500+ lines required by the mix utility. |
|
|
Provide additional
general-purpose date and string manipulation capabilities. |
Interacting with Host Screens
The MoveCursor, StrAt, CmpAt, AF, TF, Clear, Skip and
XmitLocal functions make it easy to work with AS/400 form-oriented interactive screens.
The following example "looks at" a field on a host screen and sets it to
"Y" if its not already set. The MoveCursor function can be used to insure the
screen cursor is properly positioned before writing to the screen.
if(!CmpAt(5,24,"Y"))
{ /* If "select active" isn't "Y" */
MoveCursor(5,24); /* Move cursor (if necessary)
& */
XmitLocal("Y"); /* Change
it to "Y" for yes */
} |
The next example reads information from the current
screen into a local variable called "account" and completes a fill in the blank
form. Note the use of the Clear, Skip, AF and TF functions. Clear erases the current
contents of a field, Skip skips over a field, TF (truncated field) inserts a maximum of n
characters into a field and generates a 5250 field-exit code, AF (auto-tab field) properly
handles an auto tab field - inserting a field-exit code only if necessary. The Et_Screen
function waits for the AS/400 to respond by monitoring the status indicators in line 25
and then names the function based on the host screen name.
strcpy(account,
StrAt(2,48,10) ); /* Fetch account# from screen */
MoveCursor(7,24);
/*
If necessary, move cursor */
Bt("");
/*
Begin transaction */
Mxmit(
/*
Enter...
*/
Clear(3),
/*
... <clear 3 fields> */
AF(account,10),
/*
account number */
Clear(2),
/*
<clear 2 fields> */
TF(min_amount,6),
/*
minimum amount */
TF(max_amount,6),
/*
minimum amount */
Skip(2),
/*
<skip 2 fields> */
"^M","");
/*
& press enter key */
Et_Screen("ID99", "nextscrn", 100); /* Wait for next 5250
screen */ |
Functions Provided by the AS/400 Test Library
Screen Functions:
|
BackupTo(
) |
Back up to a given
screen; |
|
ButtonClick(
) |
Simulate a GUI
button click operation; |
|
Clear(
) |
Clear 1 or more host
application fields; |
|
EtScreen(
) |
Name transaction
using host screen name; |
|
FollowPath(
) |
Access all screens
in a given 'path'; |
|
ListPopUp(
) |
Pick value from 5250
pop-up list screen; |
|
LogScreenImage(
) |
Write current screen
image to log file; |
|
MoveCursor(
) |
Reposition cursor on
screen; |
|
SendPathName(
) |
Send path name to
the AS/400; |
|
Skip(
) |
Skip over 1 or more
host application fields; |
|
StillOn(
) |
Test if still on the
same screen; |
|
UnfoldScreen(
) |
"Unfold/fold"
current screen for a better look; |
|
WaitINH(
) |
Wait for next screen
- (watch 'INH' status); |
|
XmitLocal(
) |
Send data to screen
without logging (XT1/XT2). |
Screen Pseudo-functions
|
Press_Cancel |
Send host 'cancel'
function; |
|
Press_Enter |
Send host 'enter'
function; |
|
Press_Exit |
Send host 'exit'
function; |
|
Press_UnFold |
Send host
'fold/unfold' function; |
|
Press_List |
Send host 'list
popup' function; |
|
Press_NextScrn |
Send host 'next
screen' function; |
|
Press_PrevScrn |
Send host 'previous
screen' function; |
|
Press_PageDown |
Send host 'page
down' function; |
|
Press_PageUp |
Send host 'page up'
function; |
|
AF |
Insert an auto-tab
field into screen form; |
|
TF |
Insert a truncated
field into screen form; |
|
SCREEN_NAME |
Return host
'program' name read from current screen; |
|
Et_Screen |
Wait for next screen
and name transaction based on host screen name. |
General Functions:
|
AddSeparator(
) |
Add a trailing blank
to non-null string; |
|
AddWorkingDays(
) |
Compute date 'n'
working day from date; |
|
AsciiDate(
) |
Convert UNIX date to
"yyyy/mm/dd" & "yymmdd"; |
|
CopyNum(
) |
Copy a fixed-length
numeric string; |
|
CopyTxt(
) |
Copy a fixed-length
text string; |
|
DaysBetween(
) |
Compute number of
days between two dates; |
|
DecActiveCount(
) |
Decrement active
script count; |
|
GetTime(
) |
Get current date
& time in "local time" format; |
|
IncActiveCount(
) |
Increment active
script count; |
|
MThink(
) |
Pause for multiple
Think() periods; |
|
SetLoggingDetail(
) |
Set level of detail
in log files; |
|
SignalHandler(
) |
Signal Handler; |
|
StrEQU(
) |
Compare strings of
unequal length; |
|
SkipSpaces(
) |
Skip over leading
spaces in a string; |
|
TimeoutHandler(
) |
Time out handler; |
|
TruncateField(
) |
Truncate field to
given length. |
General Pseudo-functions:
|
CmpAt( ) |
Compare
string to screen contents; |
|
StrAt( ) |
Read
string from current screen; |
|
Restart( ) |
Force
script to restart at last restart point; |
|
Restart_Point |
Declare
a script restart point; |
|
StrEQ( ) |
Compare
strings of equal length; |
|
StrIN( ) |
Check if
string is contained within another siring |
C Language Templates
Code has been written, tested and documented for many
general purpose AS/400 processing tasks. The AS/400 Test Library includes template code
for:
- Defining a virtual user, including transaction mix and
throughput;
- Reading records from shared data files;
- Generating script errors files (including screen images);
- Processing multi-page on-screen lists;
- Account searches;
- Time-out and signal handling;
- Signing on and off an AS/400 system under test (SUT);
- Recovery from host inactivity time-outs.
AWK & Shell Scripts
In addition to C language templates, the AS/400 Test
Library includes AWK and shell scripts which make it easier to define test workloads and
to analysis test results. The make_mix and make_tab scripts can simplify workload
definition by several orders of magnitude.
AWK Scripts:
|
active_users.awk |
Analyze
log files to develop a profile of concurrent usage. For example, if a test workload
included 300 users, how many were actually active performing functions at any given time
throughout the run?; |
|
avg_response.awk |
Modify
extract transaction file to allow transactions to be analyzed by class (e.g. begin search,
enter data, update D/B, cancel,
); |
|
fixDOS.awk |
Convert
multiple DOS formatted files to UNIX format; |
|
make_mix.awk |
Transform
simple test definition file (*.test) into Performix/TTY compatible mix command file; |
|
make_tab.awk |
Transform
simple user definition file (*.user) into Performix/TTY compatible mix table file; |
|
parse_STD.awk |
Convert
standard report (*.STD) to Excel/Lotus import format (*.csv) file; |
|
play_cmds.awk |
Scan
error files (*.err) and generate 'play' commands to make it easy to play back the
functions which caused the host application errors; |
|
sort_STD.awk |
Sort
standard reports (*.STD) by average response times; |
|
sort_STD_90th.awk |
Sort
standard reports (*.STD) by 90th percentile response times; |
|
split_Nways.awk |
Split
input data file(s) for use on multiple test driver boxes; |
|
view_err.awk |
View
a brief summary of error files (*.err) which includes error and host status line messages. |
Shell Scripts:
|
netcopy |
Copy file(s) to
additional test driver boxs |
|
gv_reset |
Reset Performix/TTY
global section variables. |
|