Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PWithaarImproveQS opened this issue Jul 7, 2021 · 0 comments

Comments

@PWithaarImproveQS
Copy link

PWithaarImproveQS commented Jul 7, 2021

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant