Application Testing [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Application Testing
You have now completed the development stages of a small, but workable
application. The next step is to test it.
As a developer, you can test your application without leaving the
developer application. The Test option on the developer main menu runs
your application as it appears to the end user. When you test an
application using the application testing option, you have access to some
facilities that are not available to end users. These facilities can
help you identify problems.
Any Problems?
Sometimes, things can go wrong when you test your application. The
application may not behave as expected or it may even abort and return
you to the developer main menu.
The remainder of this lesson assumes that nothing does go wrong. If
things don't work as you expected, refer to "Handling Problems". It
covers the most common problems that may occur.
If any problems you encounter are not explicitly described, refer to the
HP ALLBASE/4GL Developer Reference Manual for further information.
To test your application:
1. Return to the developer main menu and select the Test option.
This loads a new HP ALLBASE/4GL environment and executes the
initial action for the application. The initial action is either
a menu or process. This is defined in the administrator
definition for the application. The main menu for the application
should appear.
2. Activate Product Details
This executes the product_proc process. This process in turn
displays the product_scrn screen.
3. Enter data into the screen as follows:
Action Explanation
------------------------------------------------------------------------------
Enter abc HP ALLBASE/4GL alters the characters to upper-case.
It also responds with a message to tell you that
the data is less than the required minimum length.
(Remember that you specified that this field must
be six characters long.) This is a standard HP
ALLBASE/4GL field validation.
Enter 123456 Before moving the cursor to the next field HP
ALLBASE/4GL executes the product_key_read function
associated with this field. This function is an
after function because it is executed after the
field is committed. The function reads the product
file and searches for a record with a primary key
that matches the product number just entered. This
record does not exist, so HP ALLBASE/4GL displays a
warning message. For the HP TurboIMAGE/XL based
application, an HP TurboIMAGE/XL warning message is
also displayed.
Table 5-0. (cont.)
Action Explanation
------------------------------------------------------------------------------
Press Return The Description field has been defined as a
required field. You cannot move to the next field
if the Description field is blank. HP ALLBASE/4GL
displays a message informing you that the field
cannot be left blank.
Enter test product The value for the product description is accepted.
The cursor moves to the supplier number field when
you press Return.
Press Shift and Tab. This is also a required field. However, you can
Then press Return leave it blank and move back to the previous field
on the screen.
Press Tab This moves the cursor back to the supplier number
field.
Enter 1 This value is accepted and the cursor moves to the
lead time field after you press Return
Press Return This is not a required field, so you can leave it
blank by pressing either Return or Tab. You are
prompted to press the Commit Data function key to
complete the screen.
Press Commit Data This terminates the screen and returns control to
the process driving the screen. The process writes
the new record to the file and then returns to the
start, displaying the screen again.
MPE/iX 5.0 Documentation