Application Testing [ HP ALLBASE/4GL Developer Reference Manual Vol. 2 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 2
Application Testing
HP ALLBASE/4GL allows you to test an application from within the
developer. You can also test the application as an end user.
To test an application from within the developer, select the Test option
on the developer main menu. This selection runs the application as it
would appear to the end user. HP ALLBASE/4GL returns you to the
developer main menu when the application finishes, or terminates the
application if a fatal error occurs.
To test the application as an end user, you must return to the HP
ALLBASE/4GL sign-on screen, and then sign on to your application as an
end user. To do this, you must have an HP ALLBASE/4GL end user name, and
this name must be included in the list of users for your application. If
you have signed on to the application as an end user, HP ALLBASE/4GL
returns you to the sign-on screen at the end of the application. If a
fatal error occurs in end-user mode, HP ALLBASE/4GL returns you to
MPE/iX.
Using Databases during Application Testing
If the application uses HP ALLBASE/SQL or HP TurboIMAGE/iX databases, HP
ALLBASE/4GL automatically connects to the database during application
testing when you execute a process or function in the application that
requires access to the database. HP ALLBASE/4GL releases from the
database when you exit from application testing mode.
Menu Bypass Facility
While you're running an application in the application testing mode, you
can use the menu bypass facility to execute any component in the
application. To use the bypass facility, enter / at any menu in the
application. HP ALLBASE/4GL displays a message requesting you to enter
an action. To enter an action, enter an action prefix followed by a
hyphen and the name of the action, and then press Return. HP ALLBASE/4GL
executes the action as though it was selected directly from a menu.
The action prefixes are:
Prefix Action
B- Background process
D- Menu or data screen
F- Function
P- Process
R- Report
H- Help screen
X- External program
Training Mode
While you're testing an application, you can enable the Training Mode if
you don't want to write data to the application's data files. The
application data files are still available for reference purposes.
To enable the training mode, press the System Keys function key, and
then press the More Keys function key. You can now activate training
mode by pressing the Training Mode function key. An asterisk in the
function key display indicates that training mode is active.
Using Trace Mode
HP ALLBASE/4GL has a trace mode that allows you to run an application on
a step-by-step basis. When trace mode is active, the system displays the
current logic block and step on the bottom two lines of the screen. The
system pauses at each step for about three seconds, and then proceeds to
the next step.
You can only use trace mode while you are running the application from
within the developer using the application testing option. You cannot
use trace mode if you are running the application as an end user.
To activate the trace mode, press the System Keys function key, and
then press the More Keys function key. You can now activate trace mode
by pressing the Trace Mode function key. To cancel trace mode, press
the Trace Mode function key again. An asterisk in the screen display
for the Trace Mode function key indicates that trace mode is active.
Trace mode can also be activated by moving a non-zero value into the
*LTRACE communication area from within a logic block. To turn trace mode
off, move a zero into *LTRACE. See chapter 4 for more information on the
*LTRACE communication area.
While you're using trace mode, HP ALLBASE/4GL records a trace log file.
The trace log file is a file in the temporary domain of your log-on group
and account. The formal file designator for this file is HP4TRACE. The
default for this file is a file in the temporary domain of your current
log-in group and account.
If desired, you can use a file equation to direct the generate log to a
permanent disk file or a suitable printer.
If required, you can set the trace message delay to any value (including
zero seconds) by using the -m option on the HP ALLBASE/4GL command line.
The command line becomes:
HP4GL "-in"
where n is an integer number ranging from 0 to 9 to specify the message
delay in seconds.
MPE/iX 5.0 Documentation