gpt4 book ai didi

php - Gherkin + Behat 场景大纲抛出 Behat\Gherkin\Exception\ParserException

转载 作者:可可西里 更新时间:2023-10-31 23:06:54 25 4
gpt4 key购买 nike

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

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] Expected Comment or Scenario or Outline or Step token, but got Examples

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

最佳答案

有例子,你必须使用“场景大纲”而不是“场景”。

关于php - Gherkin + Behat 场景大纲抛出 Behat\Gherkin\Exception\ParserException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16110645/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com