Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Resolve cucumber's scenario outline template parameters

Open
#2,778 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, node.js
Domain
testing

Research direction

No source file or test is named in the issue. Start by locating the scenario-outline name rendering and the existing handling of template parameters, then compare it with the expected names shown here. Done means generated scenario names replace each outline parameter with the corresponding Examples value, with coverage for multiple example rows.

Written by the indexing model from the issue text.

Description

What are you trying to achieve?

When using cucumber's scenario outlines, it's much easier to review your tests results when they don't all have the same name.
So cucumber supports converting the following

Scenario Outline: eating
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |

to instead look like

Scenario Outline: Having <start> cucumbers, and eating <eat> leaves <left>
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |

It was done here https://github.com/cucumber/cucumber-js/issues/267
The 2nd version of this test would produce scenarios with the following names:

  • Having 12 cucumbers, and eating 5 leaves 7
  • Having 20 cucumbers, and eating 5 leaves 15
What do you get instead?

Instead, it appears the template parameters are not resolved when printing the scenario name when the feature is run

Provide console output if related. Use --verbose mode for more details.
In my case my scenario name is User <userType> <id> should have correct credentails.
and I get
User <userType> <id> should have correct credentails. {"userType":"\"issuer_rep\"","id":"10","homePage":"\"landing/info\""}

Details
  • CodeceptJS version: CodeceptJS v3.0.4
  • NodeJS Version: v14.2.0
  • Operating System: Windows/Mac/Ubuntu
  • webdriverio
Dominant language
JavaScript
Stars
4.2k
Forks
756
Avg merge
2d 9h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codeceptjs/CodeceptJS

All issues in codeceptjs/CodeceptJS

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.