Repository navigation
Description
At the moment section and settings names in Robot Framework syntax can use spaces freely anywhere in the name. For example, this is valid syntax:
*** set t in gs ***
Doc U ment at ion Insane, right?
Tes Tse Tup No operation
*** t e s t c a s e s ***
Example
[ t I me OUT ] 1 s
No operation
This kind of strange names don't provide any real benefits, but make it harder to implement parsers that recognize what's valid syntax. This is also going to affect us in the future as we are planning to re-implement Robot Framework's own test data parsing.
We are going to deprecate the support for space-insensitive setting and section names in RF 3.1 and then remove this functionality already in RF 3.2. Details about the syntax what is accepted in the future is explained below:
-
Valid section names are
Settings,Variables,Test CasesandKeywords. Also singular forms likeSettingorKeywordare allowed.Testcasesis will not be supported anymore. -
Valid setting names in the setting section are going to be are
Documentation,Metadata,Suite Setup,Suite Teardown,Test Setup,Test Teardown,Test Template,Test Timeout,Force Tags,Default Tags,Library,ResourceandVariables. For exampleTestsetupandTest Set Upare both going to be disallowed. -
In the test case and keyword sections all settings must be written without any spaces like
Documentation,SetupandTeardown. -
Space is going to be allowed, but not mandated, around section names and the asterisk markers so that both
*** Settings ***and***Settings***are accepted. The former is generally recommended. -
Space is also allowed, but not mandated, around setting names and
[]markers in the test and keyword tables so that both[ Documentation ]and[Documentation]are accepted. In this case the latter is generally recommended. -
Section and setting name matching will continue to be case-insensitive.
-
The rules about the amount of the asterisk characters is not going to change (at least as part of this issue). It is still fine to just have the one leading asterisk like
* Settingsand all others are optional. The format with three leading and trailing asterisk like*** Settings ***is highly recommended and may even be mandated in the future.
Activity
Avoid to-be-deprecated section names in tests.
pekkaklarck commentedon Oct 16, 2018
Documentation in the User Guide didn't even mention that section and setting names would be space-insensitive. That hopefully means such usage is very rare.