Procedure Interception

As of TestBench 8.2, Procedure Interception is now offered in Test Cases.

Test Cases have always been able to provide information about program calls, but now you can even obtain more detail.

The new procedure information option can give additional information of the internal workings of your application.

  • Calls to internal and external procedures
  • Calls to external programs
  • Call parameters and values are recorded (pre and post call)
  • A count of each call is made
  • A timeline and call stack

For our first iteration of procedure interception, the scope will be interactive RPG ILE programs.


ILE source debugger on the IBM i server is required.

For when the bound program is created, the debugging views need to include one of the following: 

Within TestBench, the Procedure Interception option needs to be set to 1 for on. This option can be found in Test Options (F21) within a Test Case.

Once the pre-requisites are met, define your program and parameters as you normally would in a Test Case, and simply execute your test. Select option 21 Results next to the Test Case, followed by option 5 Details from the Test Run Details screen.
To view the results for Procedure Interception, from the Test Run Details screen, select option 3 Programs next to the applicable sub run.

Interception Summary

From the Interception Summary screen, the Caller column lists the programs called.
The Called column lists the procedure that was invoked. The entries are categorised under internal and external procedures, as well as external programs.

The References listed show:

Exist The number of times the procedure or external program exists in the program. 

Used Indicates the procedure was used.
This indicates how many of the calls that exist in the program were used.

Count The total number of times (count) the procedure was used/called/executed.    
There is also a view for all used references, all found and available references. 


1 Call Summary This option provides summary information related to the call. For each procedure call, the call number, line number, time called and returned, and the amount of time taken listed in milliseconds.

An additional option 1 Parameter Values will show each parameter along with the passed and received parameter values.

Function Keys

F3=Exit Exit out to a prior menu.

F6=All found refs This will list all found procedures. The function key works as a toggle and the function will change to F6=All avail refs List all available references for procedures. The function key again toggles and will change to F6=All used refs This is the default view for the Interception Summary screen. The Used procedures will be listed.

F10=Timeline The Interception Timeline screen provides a chronological view of all the procedures that were called during the test. The call number to the program as well as the line statement number are listed for each procedure. An additional option 1 Parameter Values will show each parameter along with the passed and received parameter values.

F12=Cancel Go back to the prior screen