Skip to content

Cucumber title doesn't load parameters from datatable on scenario outlines #296

Open
@farmijolg

Description

@farmijolg

Issue description

Sometimes we use parameters on the titles of the scenarios to avoid duplication of very similar tests. On the cucumber version included on wdiov5, we're facing that the onTestPass event is not replacing the variable on the fullTitle field with the parameter specified on the examples table.

Steps to reproduce

  • Using an scenario outline like this
    Scenario Outline: Signup with the <tier> selected
     Given I use the preselected url for <tier>
     Then <tier> option is preselected

     Examples:
       |tier|
       |tier1|
       |tier2|

  • Run the test
  • Debug on the reporter the object passed to onTestPassed() event and to onSuiteStart() event

Expected behavior

The fullTitle field on both events is: "Signup with the tier1 selected" for the first iteration, "Signup with the tier2 selected" for the second iteration

Actual behavior

On the full title, for both events, the object received is

TestStats {
  type: 'test',
  start: 2019-11-21T08:31:32.217Z,
  _duration: 2117,
  uid: 'I clean the browser cookies6',
  cid: '0-0',
  title: 'Given I clean the browser cookies',
  fullTitle: **'Signup users: Signup with the <tier> selected: Given I clean the browser cookies',**
  output: [],
  argument: undefined,
  state: 'passed',
  end: 2019-11-21T08:31:34.334Z
}

Issue occurred on browser/platform

Not related to the browser.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions