Metadata in Robot Framework Runner¶
In your .robot file, you can insert Squash Metadata into test cases via tags.
For example:
Metadata syntax conventions¶
In order to work properly, the following syntax rules have to be followed.
Spaces¶
In a Robot script, all tags must at least have two spaces between each other to be considered as a new tag. If you put only one space, it will be considered as the same tag.
Prefix¶
To be recognized as a metadata, you have to prefixed it with “tf:”.
Metadata Key¶
In a Metadata annotation, the key is mandatory. A metadata key MUST be ONE WORD which contains only alphanumeric characters, dashes, underscores and dots.
Important
Metadata key is case insensitive and must be unique in a test case.
The same metadata key can be found in different test cases but values can’t be the same. This is not a problem if the metadata key has no value.
Metadata Value¶
The value is optional. A metadata value MUST be ONE WORD which contains only alphanumeric characters, dashes, slashes, underscores and dots.
You must separate the metada key and value with an “=” symbol.
Important
Metadata value is case sensitive and must be assigned to a metadata key.
If you duplicate two tags with exactly the same key and value, Robot Framework will automatically ignore the second tag with the same value.
Furthermore, if you put two metadata in the same test case with the same key but with different values, our runner will inform you that there is a duplicate key.
Metadata with multiple values¶
It is possible to have many metadata values associated to a same key.
To separate the different values, you must use a “|” symbol (Press AltGr and 6).
Use metadata for TM - TF autolink¶
TF metadata handles the TM - TF autolink. Autolink is a feature to ease the link between a TM test case and a test automation script. On TM side, a UUID is now provided (when the workflow is activated):
This UUID is used as an identifier.
In your automation test, add a TF Metadata which key is linked-TC
and value is the UUID from the corresponding TM test case.
As you can see in the example below, it’s possible to link many TM test cases to the same automation test (two UUID are set in the “value” separated by a “|”):