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

Parsing exception on missing examples #967

Merged

Conversation

melchiork
Copy link
Contributor

This is related to #792 (Better error message for Scenario Outlines without arguments)
Now a SemanticParserException will be thrown when Examples are missing from a Scenario Outline. The exception will point to the Outline with missing examples. Multiple Outlines without Examples are also handled.

@SabotageAndi
Copy link
Contributor

Thanks for the PR!
I will have a look at it on Friday.

@SabotageAndi
Copy link
Contributor

@melchiork Looks very good.
Could you please add two additional tests

First for a scenario outline, that has the example keyword, but no table.

    Scenario Outline: Name
    Examples:

Second for a scenario outline, that has example keyword and a table with column names

    Scenario Outline: Name
    Examples:
         | Column |

…Outline but there is no header or no concrete Examples
@melchiork
Copy link
Contributor Author

@SabotageAndi I've changed one test and added another one as you asked. I've changed the behavior so the parsing will fail on both cases.

@SabotageAndi
Copy link
Contributor

Thanks for the changes!
If you could add an entry to the changelog for this change, I will merge it ASAP.

@SabotageAndi SabotageAndi self-requested a review November 11, 2017 13:27
@melchiork
Copy link
Contributor Author

@SabotageAndi Changelog entry added.

changelog.txt Outdated
@@ -1,3 +1,7 @@
2.3.1 - 2017-??-??
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.3 is not yet released. Please add the entry to the 2.3 release

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And add a link to the PR (like the entries for 2.2.2)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@SabotageAndi SabotageAndi merged commit 7504685 into SpecFlowOSS:master Nov 11, 2017
@SabotageAndi
Copy link
Contributor

Thanks for the change. It's merged.

@melchiork
Copy link
Contributor Author

@SabotageAndi You're welcome.

@melchiork melchiork deleted the ParsingExceptionOnMissingExamples branch November 11, 2017 17:31
@SabotageAndi SabotageAndi added this to the SpecFlow 2.3 milestone Dec 12, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants