11.0+55 Configuration of the Procedure call definition node
As described in Procedure calls: recording and converting, QF-Test provides the ability to automatically convert freshly recorded sequences or nodes from existing test suites into Procedure calls. This allows meaningful procedure names to serve as keywords directly during recording or even at a later time, improving both the readability and - through the use of procedures in general - the maintainability of the recorded tests.
The conversion of individual nodes into procedure calls is configured via Procedure call definition nodes. The definition specifies both which nodes are to be converted into a particular procedure call and which values are to be set in addition to the name of the procedure to call. This applies to Variable definitions, Variable for return value, and the Comment.
To configure a Procedure call definition node correctly, it is helpful to first consider the structure of the procedures involved.
A Procedure call definition describes which sequence of nodes corresponds to a particular procedure and should therefore be replaced by a call to that procedure. The goal is to replace as many nodes as the procedure covers - but not more. It is therefore necessary to describe the nodes executed within the procedure as well as certain control structures such as If, Try, and Loop. For detailed information please see Mapping procedure structures.
In Criteria for identifying nodes you will learn in which YAML sections the respective node information can be stored. The section YAML syntax of the Procedure call definition node explains the YAML syntax in detail.
As a very useful feature, QF-Test provides automatic generation of Procedure call definitions
for existing procedures.
To do so, select one or more procedures or packages, open the popup menu
by right-clicking and choose the entry
»Further node operations«-»Create procedure call definition«.
The automatic generation is designed for recording procedure calls.
The algorithm is based on typical cases. Individual adjustments
can be made via Doctags for controlling automatic definition creation, so that no manual rework is
necessary when regenerating. Alternatively, adjustments can be made directly
in the YAML code. In that case it is recommended to mark the Procedure or
the Procedure call definition with the doctag @prec/noUpdate.
This causes the procedure to be skipped during regeneration.
The section Special case: adding a comment, no conversion shows how to add a comment to a node you do not want to convert to a procedure call.
At the end of the chapter, Entries in the recording log describes which information is written to the The Recording Log during the conversion of nodes.