This section describes how to test an external subroutine. The tester can test the subroutine using either a subprogram or a program that calls a subprogram. The following tables describes which option to use:
| External Subroutine Features | Test Using |
|---|---|
| No parameters and screen input/output | Program (Natural for Ajax provides the screen input/output) |
| Parameters and no screen input/output | Subprogram (then you can use the subprogram
tester to create scripts so the tests can be run again)
Note: |
Regardless of which option you use, temporary Natural objects are created to perform the tests and then deleted when the Natural for Ajax page or subprogram tester is closed.
Note:
If you intend to use the temporary subprograms to create a unit
(batch) test for the subroutine, save the files locally before closing the
tester.
The following topics are covered:
To access the subroutine tester
Open the context menu for the subroutine in the Navigator view.
Select .
The test options for external subroutines are displayed. For example:

To test an external subroutine using a program
Open the context menu for the subroutine in the Navigator view.
Select .
The subroutine is tested and the results are displayed in the Natural I/O view. For example:

To test an external subroutine using a subprogram
Open the context menu for the subroutine in the Navigator view.
Select .
The tester creates a temporary subprogram file to test the subroutine. For example:

Note:
This editor functions in the same way as the editor used to
test a subprogram. For information on using this editor, see
Features of the Test
Editors and Test a Subprogram
Directly.