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.
Scenario is one of the core Gherkin structures. the Scenario:keyword (or localized one), followed by an optional scenario title. Each feature can have one or more scenarios, and every scenario consists of one or more steps.
Behat is a tool to test the behavior of your application, described in special language called Gherkin. Gherkin is a Business Readable, Domain Specific Languagecreated especially for behavior descriptions. It gives you the ability to remove logic details from behavior tests. Gherkin serves two purposes: serving as your project’s documentation ...
Gherkin Syntax Features Scenarios Scenario Outlines Backgrounds Steps Givens Whens Thens And, But Multiline Arguments Tables PyStrings Tags Gherkin in Many Languages Writing Features - Gherkin Language¶ Behat is a tool to test the behavior of your application, described in special language called Gherkin.
To check if Behat and Gherkin support your language (for example, French), run: behat --story-syntax --lang=fr Note Keep in mind that any language different from enshould be explicitly marked with a #language:...comment at the beginning of your *.featurefile:
With examples, you have to use the "Scenario Outline" instead of "Scenario".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With