Gherkin + Behat Scenario outline throws Behat\Gherkin\Exception\ParserException
Asked Answered
C

1

9

I am trying to run registration example and I am getting stuck

Scenario: New user registration; poor password
  Given I am on "/register"
  When I fill in "username" with "admin"
  And I fill in "password1" with "<pw>"
  And I fill in "password2" with "<pw>"
  And I press "Login"
  Then I should be on "/register"
  And I should see an "pwError" element

  Examples:
    |  pw   |
    |  12   |
    |  20   |

Then I get the following error:

[Behat\Gherkin\Exception\ParserException] Expected Comment or Scenario or Outline or Step token, but got Examples

What am I doing wrong? I cannot find any help on behat doc or so.

Crux answered 19/4, 2013 at 17:50 Comment(0)
E
18

With examples, you have to use the "Scenario Outline" instead of "Scenario".

Erme answered 21/4, 2013 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.