cucumber-boilerplate icon indicating copy to clipboard operation
cucumber-boilerplate copied to clipboard

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

Open farmijolg opened this issue 6 years ago • 1 comments

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.

farmijolg avatar Nov 21 '19 08:11 farmijolg

Same problem here

paulodsncir avatar May 11 '20 17:05 paulodsncir