Skip to content

Deprecate using section and setting names space-insensitively #2985

Closed

Description

@pekkaklarck

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:

  1. Valid section names are Settings, Variables, Test Cases and Keywords. Also singular forms like Setting or Keyword are allowed. Testcases is will not be supported anymore.

  2. 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, Resource and Variables. For example Testsetup and Test Set Up are both going to be disallowed.

  3. In the test case and keyword sections all settings must be written without any spaces like Documentation, Setup and Teardown.

  4. 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.

  5. 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.

  6. Section and setting name matching will continue to be case-insensitive.

  7. 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 * Settings and 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

  1. added this to the v3.1 milestone on Oct 15, 2018
  2. pekkaklarck commented on Oct 16, 2018

    @pekkaklarck
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions