Doctags
Besides node attributes QF-Test also supports doctags to influence the behavior of nodes during test execution or
for report generation. Each doctag can be specified in a separate line in the Comment attribute of a node in the form
@teststep
or @noreport node
. They must be placed after the general description of the
node.
Doctags for reporting and documentation
Doctags used for formatting test documentation of Test sets and Test cases are described in section 24.2, doctags for formatting of the documentation of Packages and Procedures in section 24.3.
The doctags described below influence the reprensation of nodes in the report.
Doctag | Nodes | Description |
---|---|---|
@teststep [name] | All nodes | If this doctag is set, the node will be treated as Test step in the report. You can specify an optional name. |
@report | Check nodes, Sequence with time limit and Server HTTP request nodes | If this is set the node will be reported as check in the report in any case. |
@noreport [type],[errorlevel] | All sequences like Test case, Test set or Test step, all Checks, Sequence with time-limit, request steps or procedure calls | If this doctag is set, the node won't be mentioned in the report. See subsection 62.1.1 for details. |
@link [filePath/url] | All nodes | This doctag can be used - multiple times if desired - to link to an external resource or file. The target can then be opened in an associated application or shown in the system file manager by right-clicking and selecting the respective entry in the popup menu (»Open link« or »Show file in explorer«). Files are resolved relative to the current test suite. |
4.2+62.1.1
@noreport Doctag
You can use the @noreport doctag to filter several nodes from the reports.
You can make use of two optional parameters to specify the filtering. Those parameters are
type
and errorlevel
. Example of a valid syntax: @noreport tree;errorlevel<=WARNING
.
- type
- You can use either 'tree' or 'node'. 'tree' is the default in case nothing is specified. Using 'tree' filters the entire node and all children from the report. 'node' filters just that particular node from the report. The children will be in the report.
- errorlevel
-
This parameter is only activate for sequence nodes like Test set,Test case or Test step.
Using this parameter enables you to filter nodes only if dedicated error level have been reached.
You can configure the error levels
EXCEPTION
,ERROR
,WARNING
orMESSAGE
. For comparison you can use >,<,<= or >=.errorlevel<ERROR
filters the node only if no error and no exception occurred. That's the default setting.errorlevel>=MESSAGE
filters the node in any case. That's very dangerous of course and should only be used if there are very good reasons.
Doctags for Robot Framework
The following doctags are used to designate QF-Test Procedures or entire Packages for use with Robot Framework. See chapter 30 for further information about the Robot Framework integration.
Doctag | Nodes | Description |
---|---|---|
@keyword [name] | Procedures |
When used in a Procedure node, the name of the procedure or the optional name specified after the
doctag is provided as keyword to Robot Framework. It is sufficient to provide one of the formats supported by
Robot Framework which will automatically convert from other variants, so that, for example, a Procedure named
|
@keyword | Packages | In Package nodes the @keyword doctag can be used without argument to designate all directly or indireclty contained Procedures as keywords based on their name. |
@tag [name] | Procedures | Names specified with the @tag doctag in Procedure nodes are passed through to Robot Framework as tags. |
Doctags for test execution
Using those doctags influences the execution of tests.
Doctag | Nodes | Description |
---|---|---|
@scope [QF-Test component ID|SmartID] | All nodes | Upon node entry the given component scope is pushed and applied to all subsequent component resolution based on SmartID until the node is exited. See section 5.7 for details. |
@rerun [parameters] | All nodes | You can configure the instant rerun in case of errors. Please see subsection 25.3.2 for details. |
@outputFilter keep [regexp], multiple times possible | All SUT client starter nodes | Only those lines in the output of the process started by the node that match the specified regular expression are shown in the QF-Test terminal. |
@outputFilter drop [regexp], multiple times possible | All SUT client starter nodes | Lines in the output of the process started by the node that match the specified regular expression are not shown in the QF-Test terminal. |
@dontcompactify | All nodes | Designate the node as relevant for the run log so it will not get removed during compactification (see option Create compact run log). |
9.0+@option [option name] [value] | All nodes, multiple times possible | Set an option to the given value during the execution of the node. Effective for QF-Test itself and all active SUT clients. If a new client gets started while such an option is in effect, it will inherit that option's value as its default setting and thus keeps it even after execution leaves the current node and the option gets reset. |
Doctags for Editing
Using those doctags can influence the behavior of QF-Test during editing.
Doctag | Nodes | Description |
---|---|---|
@blue | All nodes | Add a blue mark when loading the test suite the next time. |
@breakpoint | All nodes | Add a breakpoint when loading the test suite the next time. |
@green | All nodes | Add a green mark when loading the test suite the next time. |
@red | All nodes | Add a red mark when loading the test suite the next time. |
@yellow | All nodes | Add a yellow mark when loading the test suite the next time. |
Doctags influencing the procedure builder
The doctags for use in the definition file for the procedure builder are described in chapter 56. In chapter 27 you will find general information on the procedure builder.