REF - Refer to test case 

The REF function is used to modularize test cases. It puts the functionality of the referred test case in the current test case. Data is passed between the current test case and the referred test case via its import/export interface.

Use the REF function to use a test case in another test case.

  1. Enter REF in the Funct. field and the called test case name in the Object field.
  2. Go to the called test case detail maintenance by positioning the cursor on this line, and double-clicking or choosing Choose.
  3. Maintain the import interface as follows:

- assign a variable, constant or parameter to the calling test case.

- assign a variant of the called test case from which the import interface can be filled.

- no assignment, in which case the default called test case import parameter value is used, if there is one.

If a combination of the parameterization described above is used, the values assigned by the calling test case overwrite all other assignments.

An assignment by a variant only overwrites the default values of the called test case.

To use an external variant to fill the import interface, specify it as a five-character number, where e.g. the first external variant (fourth line in the text file) is 00001.

  1. Maintain the export interface. Choose Export. You can read this interface into variables and parameters in the calling test case.
  2. Specify the processing mode of the called test case in the Processing mode field.

Go to the referred test case

To see the functions of the referred test module, position the cursor it in the function editor and choose Goto ® Test module. You go to the test case display. Go back to the original test case with Goto ® Back.

Resolve reference

The REF function can also be used as a copy function. You can copy the functions of a referred test case into the current line by resolving it.

You can do this in one of two ways:

Remote call of test cases

From Release 4.0 test cases can be run locally in the remote system. A remote flag is set and an RFC destination is specified in the REF command. The version of the test case in the remote system then runs in the remote system, not the local version. The parameter interface is assigned as usual for the REF command.

The remote run log is saved in the local system. Only the referred test case and the RFC destination are specified in the local System. Click on the RFC destination to display the remote system log.

Create remote call:

  1. Go to the test case function editor.
  2. Insert a REF command in your procedure in the editor.
  3. Enter the test case to be referred to.
  4. Ignore the warning TT022 ‘CATT <test case> not found’. Choose ENTER.
  5. Choose Edit ® Remote REF target.
  6. Define an import parameter for the remote system at runtime. Enter the usual RFC destination as default.
  7. Go to the interface of the remotely-referred test case.
  8. Choose Read interface to read the remote system import and export interface definition.
  9. Enter interface values as usual.