11.0+28 Procedure calls: recording and converting

The feature "Recording procedure calls", respectively "Re-record node(s) as procedure calls", automatically replaces node sequences with calls to existing procedures. The node sequences can be either freshly recorded actions or nodes already saved in test suites or recording logs.

Converting individual actions to procedure calls offers significant benefits:

A sample test suite where you can see this feature in action can be found in qftest-11.0.0/demo/procedureCallRecording/procCallRecordingDefinitions_en.qft in the installation folder of QF-Test.

To use this feature with your procedures, QF-Test needs the corresponding procedure call definitions. These can be created automatically. To do so, select one or more procedures or packages, open the popup menu via right-click, and choose »Additional node operations«-»Create procedure call definition«. Existing Procedure call definition nodes can be adjusted manually. To assist with this, an edit button Edit button is shown to the left of each line of YAML code. For more information see Configuration of the Procedure call definition node.

To have QF-Test automatically convert freshly recorded actions into procedure calls, activate the menu item »Record«-»Record procedure calls« before recording. To convert existing nodes into procedure calls, select the relevant nodes and choose the menu item »Operations«-»Re-record nodes as procedure calls« in test suites, or the menu item »Edit«-»Re-record nodes as procedure calls« in recording logs. The selected node or nodes are processed together with their child nodes.

The conversion of nodes is performed according to the specifications in the Procedure call definition nodes. The conversion starts with the first node to be converted and searches for a matching definition for it and, if applicable, subsequent nodes. Once a matching definition is found, a procedure call is created for the respective nodes. Values from the nodes are transferred as parameters to the procedure call according to the definition's specifications. The process then repeats starting from the first node that was not part of the procedure call. If no definition matches, the current node is left unchanged and processing continues with the next node.

The definition nodes can be located either in the test suite for which the recording is being created, or in test suites included in it. Definition nodes are processed in order of their priority, and within a priority level in the order in which they were read.

In the recording log, information will be written for each Procedure call definition evaluated, to make it easier to diagnose unexpected behavior. Definitions that did not match are shown as disabled in the log.

In the chapter Configuration of the Procedure call definition node you will find all the technical details, information on the available structures for describing procedures in the form of Procedure call definition and the Automatic creation of procedure call definitions, as well as a description of the YAML-Syntax, in which the definition is ultimately written.