SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.23k stars 752 forks source link

Spec flow oss#2571 #2578

Closed clrudolphi closed 2 years ago

clrudolphi commented 2 years ago

This PR resolves SpecFlow#2571 in which Scenario Outline parameters are not handled properly when the parameter identifier is nested within outer angle brackets. The defect report provided a sample of XML demonstrating the problem. The regex used in the ScenarioPartHelper captures all text between the first open bracket and the first close bracket. This might include additional opening brackets in between. var paramRe = new Regex(@"\<(?[^>]+)>"); This regex was changed such that the captured 'param' would not include any opening bracket character.

Added a unit test for ScenarioPartHelper to confirm that the generated code Statement properly recognizes parameters within embedding brackets and generates the proper code expression. Added a feature file in Specs.Features.RegressionTests that demonstrates the fix operating end-to-end.

Types of changes

Checklist:

I'm new to this - not sure how or where you'd want me to update the changelog. Chris

SabotageAndi commented 2 years ago

Somehow VS deleted not the other files, so I did it now.

Thanks for your contribution to SpecFlow. Please submit your contributions to our SpecFlow Community Heroes program at https://specflow.org/community/submit-a-contribution/