【问题标题】:Gherkin + Behat Scenario outline throws Behat\Gherkin\Exception\ParserExceptionGherkin + Behat 场景大纲抛出 Behat\Gherkin\Exception\ParserException
【发布时间】:2013-04-21 14:53:55
【问题描述】:

我正在尝试运行注册示例,但我卡住了

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   |

然后我得到以下错误:

[Behat\Gherkin\Exception\ParserException] 预期的评论或场景或大纲或步骤令牌,但得到了示例

我做错了什么?我在 behat doc 上找不到任何帮助。

【问题讨论】:

    标签: php behat gherkin


    【解决方案1】:

    对于示例,您必须使用“场景大纲”而不是“场景”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-04
      • 1970-01-01
      • 2017-12-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-22
      • 1970-01-01
      相关资源
      最近更新 更多