question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scenario outlines not pulling variable from examples

See original GitHub issue

In a test scenario I have written, I am trying to pull a variable from the examples table and have it in the test name, however it seems to not parse the variable from the feature file. In my case, I have a field called name that I am trying to use. I have tried it both as <name> and "<name>".

image

image

image

Is this expected behaviour or a bug?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
Sjain01commented, Aug 8, 2018

@lgandecki - I also face this same issue as reported by breeny, is there any solution for it.

The issue is with displaying the values used within examples on Scenario outline. Scenario Outline: Successful sign in on <devicename>

Examples: | devicename| | macbook-15 | | ipad-2 | | iphone-6+ |

Output: screen shot 2018-08-08 at 13 19 09

I took a look at the feature file you pointed in your above post and I am using the same syntax as mentioned there but its not working.

1reaction
holgergpcommented, Nov 29, 2019

Maybe then I just don’t get the erroneous output you provided. Sorry for that. Which outputs are you expecting? As the tests pass I assume that the variables get substituted correctly in the test steps. The OP wanted to see an example variable substituted in each scenario outline run (as a part of the scenario outline). In your feature file I don’t see a variable substitution in the scenario outline definition. Does this work as expected? Scenario Outline: Navigating between main pages to <page>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scenario outlines not pulling variable from examples · Issue #47
In a test scenario I have written, I am trying to pull a variable from the examples table and have it in the...
Read more >
Cucumber - variable in Scenario title without using it in the body
I could find in a project I am a workaround that I'm happy with. The variable is used in the body, but it...
Read more >
Cucumber Feature File Example: Scenario Outline & Data Table
To access data from a data table, we create a special variable dataTable of a “DataTable” type. All data will be stored in...
Read more >
Welcome to Pytest-BDD's documentation! — Pytest-BDD 6.1.1 ...
Scenarios can be parametrized to cover few cases. These are called Scenario Outlines in Gherkin, and the variable templates are written using angular...
Read more >
Gherkin Reference - SpecFlow's documentation
A Scenario Outline must contain an Examples (or Scenarios ) section. Its steps are interpreted as a template which is never directly run....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found