Application Development |
In the process of development, Panther allows you to simulate how your application behaves and appears to end users via test mode. From test mode, you can return to the editor, make changes to your application, and resume testing without exiting from the executable.
There are two Panther executables, prodev
and prorun
(prodev32/64.exe
and prorun32/64.exe
in Windows).
prodev
, you are in the editor where you can begin creating your Panther application. To test an application component, bring focus to it and choose FileTest Mode (or the Test Mode button on the toolbar). The status bar displays Test Mode.
prorun
, you are in application mode. Access to the editor is not available.
Test Mode Menu Bar |
Once test mode or application mode is entered, the menu displays the default application toolbar. If your application has its own menu bar/toolbar, the Panther menu is not displayed.
The following menu options are available while in test mode:
Provides basic editing commands (not available in character-mode platforms) that you can use while you are testing your applications.
Includes the following options:
Provides access to Panther's logical keys and their functions. These are useful if your application screen does not provide other methods for carrying out commands, such as Exit, Transmit, Switch scope, or Zoom keys.
Allows you to bring focus to any screens that are currently open.
Provides access to transaction manager commands that you can use with screens that are derived from your database. The commands are:
Keys menu
Windows menu
Transaction menu
Refer to Chapter 34, "Specifying Transaction Manager Commands," for information on writing transaction manager commands.
Allows you to connect to, as well as disconnect from, databases. The Trace On/Off command allows you to toggle the display of SQL statements that are automatically generated by way of the transaction manager commands.
Refer to Chapter 33, "Using Automated SQL Generation," for information on setting properties that take advantage of Panther's automatic SQL generation.
(JetNet/Oracle Tuxedo only) Allows you to open, as well as close, a middleware session.
Allows you to run, view or print out a report previously saved in a metafile (refer to "Running Reports from the Report Menu" in Reports).
Database menu
Middleware Session menu
Report menu
Testing Application Components |
You can test your client screens and service components through a direct or remote connection to the database. You need to be in test mode to test how your application components and their contents function.
Notes: If the screen you are testing references other screens, the referenced screens will not be viewable unless you saved them to a library before entering test mode. Also, if you go into test mode without saving changes to the referenced screens, you will only see the last saved version of the referenced screen and not the unsaved changes.
When you want to test a screen, you bring focus to it and choose FileTest Mode (or the Test Mode button on the toolbar). If you have other open screens in your Workspace with unsaved changes, you are prompted:
Do you want to save changes to <screenName>@libraryName?
Choose the desired action:
The active screen opens in Test mode.
Notes:
Test mode is virtually identical in appearance and function to Application mode, except that when you exit Test mode you return to the screen editor.
In a two-tier architecture, you need a direct connection to the database to test your screens; however, in a three-tier architecture, you need a remote connection to the database to completely test your client screens.
Before you test your three-tier client screens, you must save the corresponding service components and selection service components (if any) to their appropriate libraries. For JetNet and Oracle Tuxedo applications, you must also define the services in the JIF.
You can test client screens and service components via a direct or remote connection to the database. You can test your service components with a direct database connection to check whether the appropriate data is passed from the database. A remote database connection is established by configuring and running servers which access the database and provide services.
You can test a service component to see if the appropriate data is passed from the database to the service component. This requires a direct database connection rather than connecting to the database by way of the application server.
Testing Screens and Service Components
Service Components
How to Test a Service Component with a Direct Database Connection
The active service component opens in Test mode. Any changes (saved or not) made to the service component are reflected in Test mode.
While in test mode you can:
Save the service component to the server library and then you can test it with client screens.
The main purpose of testing a client screen with a remote database connection is to see whether service requests are carried out and the appropriate data is returned to the client. However, to test a client screen in this manner, you must do the following as prerequisites:
Notes:
It is recommended that you adopt a naming convention that identifies client screens with their corresponding service components or vice-versa.
Now, test the client screen.
How to Test Client Screens with a Remote Database Connection
The active screen opens in Test mode.
While in test mode you can:
DBUG
logical key. (Refer to Chapter 39, "Using the Debugger," for more information.)
The main purpose of testing a client screen with a direct database connection is to test database transactions via the Transaction menu. You check to see if the appropriate data is passed from the database to the client screen.
The active screen opens in Test mode.
While in test mode you can:
DBUG
logical key. (Refer to Chapter 39, "Using the Debugger," for more information.)
If you made changes to the screen, and have not saved them, the following message appears:
Do you want to save changes to <screenName>?
If you have changed any open screens and have not saved them, Panther prompts you to save them now.
Choose Close or Quit from the system menu.