Skip to content

Ch. 3.3.2: The keyword matching logic RF <7.1 has been changed #77

@GerwinLaagland

Description

@GerwinLaagland

The matching logic of keywords has been adjusted as of RF7.1 making the current version of the Syllabus incorrect. Quote of the section 3.3.2 that needs to be adjusted:

  • If then a full match is found, that keyword is used.
  • If no full match is found, the prefixes Given, When, Then, And, and But (case-insensitive), which are used in Behavior-Driven Specification style, are removed from the called keyword name to find a match.
  • If still no match is found, Robot Framework tries to match the name with keywords that have embedded arguments.

The change was made as part of RF issue 5096.

An example test you can do to verify:

*** Test Cases ***
Example Of Keyword Matching
    Given The Website Is Up

*** Keywords ***
Given The Website Is Up
    Log    Simple matching

The Website Is Up
    Log    bdd matching

The 'Given' part of the keyword is ignored, so in this scenario, the 'Given The Website Is Up' keyword is never matched, despite being 'first' as is now claimed by the syllabus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact: majorSubstantive; triggers the major-change workflowprio: criticalUrgent; wrong/misleading or conflicts with current Robot Framework behaviorstate: needs-triageNot triaged by Syllabus Committee yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions