I'm trying to generate documentation (in pdf format) from my specflow feature files. I'm using the gerkin lib found on Nuget to parse the files.
I have some scenario outlines which have 2 example tables per scenario outline (perfectly OK according to the Cucumber book):
Scenario Outline: My scenario
Given "<this>" first value
When I enter some second "<value>"
Then the result must be equal to "<expected result>"
Examples: Some first list of values // My example name
| this | value | expected result |
| 0 | 1 | 2 |
Examples: Some second list of values // My example name
| this | value | expected result |
| A | B | C |
The problem I'm having is when you parse this file. You can access all the given examples, but only the one example name. Thus whne you build up your documentation you can't tell if its from the first or second group of examples. I've noticed other tools like 'Pickles' also have the same problem.
Here is some code which try to obtain each example name:
foreach( var feature in file.Feature.FeatureElements )
{
var example = ( ( ScenarioOutline ) ( x ) ).Example;
// this value always remain the same and is incorrect according to my feature file.
var exampleName = example.Name != exampleName
}
I recon the problem might be with the SpecFlow lib itself and not the gerkin library used for parsing - It seems NUnit can't see the second example name when it creates the test cases either.
Anyone dealt with this before?
PS: Someone please tag scenariooutline. Its not the same as scenario.