How to Test Application Objects

As you create Application Objects, you’ll want to test them. To test Application Objects, you need to run them. VPM Enterprise makes it easy to run and test your work. 

You can run some Application Objects in VPM Enterprise from their Designer or Object Editor. To run other Application Objects, you must build your application and run it.

The next two sections help you understand when you can run an Application Object in VPM Enterprise and when you will need to build your application to run an Application Object. You’ll see that most of the time you don’t need to build your application to test Application Objects.

Application Objects You Can Run and Test in VPM:

You can run and test the following Application Objects in VPM Enterprise. You don’t need to build your application first.

·       Forms: You can run and test a form from the Form Designer or the Run button on the Form Editor.

·       Reports and Labels: You can run and test reports and labels from the Report Designer.

·       Programs Called from Forms: If you call a program from a form control, you can test the program when you run the form.

·       Queries: You can run and test a query from the Query Designer.

Tip: The ability to run and test these application objects in VPME requires that the class libraries on which an object is based be open. VPM Enterprise takes care of opening its standard class libraries for an application. If you are using your own class libraries to create, say, a form, that form must be run and tested by building and running the application.

Application Objects Requiring a Build Application:

You must build your application and run it to test the following Application Objects.

·       Menu Changes: When you change your application’s menu, you must build your application to test the changes.

·       Programs Run from Menu: If you run a program directly from a menu prompt, you must build your application to run the program.

·       Menu Procedure: If you put code in a menu procedure, you must build your application to test the code.

You can build your application and run it from command buttons on the VPM Enterprise Object Builder or from options on the VPM Enterprise Tools menu Test popup. 

Build Your Application: “Build your application” means creating an .APP file from the project file. Even if you plan to distribute your application as an .EXE, you create an .APP file to test it in VPM.

If Run Application is Disabled: If the Run Application button on the Object Builder and the Run Application option on the Test menu are disabled, click the Build Application button to build the .APP.

.APP File Name

When VPM Enterprise builds an .APP file for an application, the name of the .APP file depends upon whether you entered VPM Enterprise using User Access Security, as follows:

·       If VPM Enterprise User Access Security is off, the name of the .APP file is S<Prefix>. 

   For example, if the application prefix is VSA, the .APP file name would be SVSA.APP.

·       If VPM Enterprise User Access Security is on, the name of the .APP file is S<Prefix> plus the first four characters of the User ID entered on the logon form.

   For example, if the application prefix is VSA and the USER ID is SMITH, the .APP file name would be SVSASMIT.APP.

If you plan to distribute an .APP file instead of an .EXE file, give your .APP file an appropriate name before you package it. The .APP file is stored in the project home directory. You can use the Windows Explorer to locate the .APP file and rename it.

Errors

If errors occur while you’re running a test of an Application Object, the VPM Enterprise error handler traps them and records extensive information about the errors in the Error Log. You can view the Error Log records through either the VPM Enterprise Errors form or the application Errors form.

·       VPME Errors: The VPM Enterprise Errors form shows errors that occur while running an Application Object in VPM Enterprise.

·       Application Errors: The application Errors form shows errors that occur while running your application.

The next section provides the details on the Errors forms.

 

More:

Errors