picklesdoc/pickles

Pickles did not complete successfully Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

PWithaarImproveQS opened this issue · 0 comments

The implementation of this function in VsTestElementExtensions.cs

internal static bool BelongsToScenario(this XElement xmlScenario, Scenario scenario)
{
    return xmlScenario.Name().ToUpperInvariant().StartsWith(TransformName(scenario.Name));
}

causes this error when we have scenario titles like this:


Scenario Outline: This is a great title 
(with 3 examples)

Scenario Outline: This is a great title and does also something more
(with 5 examples)

This is because the mapping to the test results is done on StartsWith. Causing the second one to map on the first one. The second scenario outline has 5 examples, but is mapped on the first one with 3 examples. Causing an index out of range exception.
Pickles did not complete successfully Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')