Creation of several procedures

Often it is both an advantage and a necessity to create several procedures in order to make a complete test-script. Each procedure will have its own specific functionality and in order for everything to work in a structured manner it is necessary to call one procedure from another procedure.

Lets try to create a new procedure called Simple Demo:

1 Right-click on the procedure header for your procedure and select the command New Procedure in the shortcut menu.

This way the procedure is created with the name MyProcedure.

2 Rename the procedure to Main Program by typing it in the field Name in the Properties window.

3 Run the new procedure by double-clicking on the procedure header.

Since you have created an empty procedure, no action will take place so far.

4 Right-click on the white line below the procedure header for our procedure and select the command Insert Step ( Procedure Call.

The General tab in the properties window.

Hereafter you select the procedure that you want in the General tab in the properties window.

5 Select for example the procedure called Simpel Demo in the drop-down menu Procedure.

Notice that the name of your script file will be used as a prefix for the name of the procedure (actually as a namespace, if you want to use the more technical term).

You can see the complete course of the program in the Execution Log window.

6 Double-click on the procedure header in your main program and notice that your procedure is now called Simpel Demo by the main program. After execution it will return to the main program, which is then closed down.

NOTE In connection with the call, you have the possibility of indicating whether this should take place directly (default) or with the help of a partner (See pg. 55 for more information on the partner term.