Open adzpond opened 6 years ago
@adzpond please reformat the scenario. And I don't see any bold marked. I think Markdown does not show it.
I did notice that. I have updated the description. Does that help?
Sometimes the VS Integration doesn't correctly guess what are parameters. We recommend for that to always use single quotes (') to "mark" parameters. Also if you have a Scenario Outline with example tables.
Ok, thanks for a quick turn around.
Scenario Outline place holders not being replaced correctly when strings in examples.
SpecFlow Version:
Used Test Runner
Version number:1.2.0
Visual Studio Version
Are the latest Visual Studio updates installed?
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config
Repro Project
Issue Description
When using a Scenario Outline that has strings in the examples table the string value is used in the step name as opposed to swapping the place holder with a wild card. If a combination of alphas and numbers are used, the alpha is used in the step name but the number is replaced with the regex.
Steps to Reproduce
Using this Scenario Outline
Scenario Outline: Successful Login with Valid Credentials Given User is at the Home Page And Navigate to LogIn Page When User enter and
And Click on the LogIn button
Then Successful LogIN message should display
Examples:
| username | password |
| testuser_1 | Test@123 |
| testuser_2 | Test@153 |
Generates this
The place holders are replaced with the string values in the first row of the examples table as opposed to a wildcard for the entire value as I would have expected. If the string is put in quotes then it works as expected.
The generated attribute looks like this
Where "testuser_" and "Test@" are values from the examples table, whereas I would have expected it to be generated as below.
The example in this article demonstrates how I would have thought it should work.
http://toolsqa.com/specflow/data-driven-testing-in-specflow/