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

Error: Scenario requires one or more steps #55

Closed
AlbanMinassian opened this issue Jan 11, 2014 · 5 comments
Closed

Error: Scenario requires one or more steps #55

AlbanMinassian opened this issue Jan 11, 2014 · 5 comments

Comments

@AlbanMinassian
Copy link
Contributor

Scenario: Simple Scenario
    Given A
    When B
    Then C

Generate Error: Scenario requires one or more steps.
Why require an empty line between Scenario and steps , users can forget.

@cressie176
Copy link
Member

Good question, and one I'm not sure of a satisfactory answer to. Since Yadda has no enforced syntax, steps can begin with any word, not just 'Given', 'When' and 'Then'. As a result its difficult to differentiate steps from scenario descriptions. Hence the blank line.

Scenario: Title
Some description

   Some Step A
   Some Step B

I'd be willing to drop the scenario descriptions altogether (which is how Yadda used to work), and would welcome suggestions since I also dislike the blank line requirement.

At the very least I can improve the error message.

@AlbanMinassian
Copy link
Contributor Author

thank you for the explanation. I add a blank line :-)

@simoami
Copy link
Contributor

simoami commented Mar 21, 2014

I think the blank line requirement is problematic and reduces the formatting flexibility that Yadda offers at the expense of enabling keywords that not even supported as far as Gherkin grammar goes.

I think the fact that Yadda allows you to indent GWT steps is a step ahead of jBehave, but this blank line requirement drags it back.

Can we drop it?

@cressie176
Copy link
Member

Hi Simo

I'm willing to drop scenario descriptions (which are the root cause of blank line requirement) as I think they're overkill, however the flexible syntax is important. GWT is a useful guideline for when you're starting BDD, but leads (IMHO) to mundane test suites.

Unless I get any strong objections I'll

  1. Copy the existing FeatureParser to ScenarioDescriptionFeatureParser. I'll maintain this parsers until 0.12.x
  2. Modify the existing FeatureParser to remove scenario descriptions and accept blank lines.
  3. Delete the ScenarioDescriptionFeatureParser in 0.12.x

@cressie176 cressie176 reopened this Mar 22, 2014
cressie176 pushed a commit that referenced this issue Aug 20, 2014
@cressie176
Copy link
Member

Fixed in 0.11.0

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

3 participants