Scenario outlines not pulling variable from examples
See original GitHub issueIn 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>"
.
Is this expected behaviour or a bug?
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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:
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.
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>