back
Avatar of Yann Spöri
Author: Yann Spöri
28. October 2020

The comment node in QF-Test

This node can be inserted everywhere and has (normally) no influence on test execution but can be used exclusively for documentation:

Highlighting

In order to ensure better visibility and legibility of comments nodes, it is possible to highlight a comment (or parts of a comment) by using emphasis (i.e. bold, italic, ...) or by using a specific text color:

The corresponding HTML tags can be used to achieve such a highlight. Doing this, a starting tag, indicates that from here on a certain font and / or color should get used. This font and / or color is then retained until a corresponding, so-called end tag appears.

Example:

Normal text <b>bold text</b> normal text again

Hereby <b> indicates that from here on the text should be marked in bold. The following </b> cancel the bold emphasis, so that only the middle part of the text is displayed in bold.

Support for the following tags has been implemented:

  • <i> to indicate that the text should be shown in italics from here on, </i> as end-tag
  • <u> to indicate that the text should get underlined, </u> as end-tag
  • <b> to indicate that the text should be shown in bold from here on, </b> as end-tag
  • <s> that the text should be crossed out, </s> as end-tag

For colored markings it is possible to add a color="colorname"-attribute to these tags. That means for a bold, blue text the whole thing has to be changed as follows:

<b color="blue">bold, blue text</b>

Whereby you shouldn't make the mistake of repeating the color attribute with the end tag (this means to write </b color="blue">), even though </b> will also cancel that later text will be displayed in blue.

In order to get get a colored text without emphasis, the <font>-tag can be used. So:

<font color="green">green text</font>

Notes

  • Comment nodes are written to the run-log and are visible for TestRunListener, too.
  • Even if it wasn't explicitly forbidden - It only makes limited sense to insert a comment node starting with " → ". With the help of " → " QF-Test is indicating the step that just gets executed. Thus a comment step starting with " → " may confuse users as they may think that this is the step that currently gets executed.

Since QF-Test 5.0.0 a new node was added, the comment node:

New comment
( Will be displayed on the page )
( Will not be displayed on the page )

0 comments