【问题标题】:Behat is skipping the testsBehat 正在跳过测试
【发布时间】:2018-10-24 10:58:42
【问题描述】:

我是新手。

我的本​​地开发环境如下:

  • Docker 环境。
  • 我已经通过 composer 安装了 behat
  • 我在 .feature 文件中有如下示例代码

行为测试

 Scenario: Get bounced back emails                                                 
    When I request "tender_manager_contact_relationships/getBouncedBackEmails/1024" 
    Then I should receive a successful response

命令

 vendor/bin/behat /var/www/xyz/features/get_bounced_back_emails.feature

输出

--- Skipped scenarios:

    features/get_bounced_back_emails.feature:6

1 scenario (1 skipped)
3 steps (2 skipped)
0m0.38s (12.33Mb)

为什么我的测试被跳过了?谁能指导我正确的方向。

【问题讨论】:

    标签: testing bdd behat cakephp-3.x


    【解决方案1】:

    找到了答案。

    • 看来我的行为基础 url 无法连接到我在 localhost :83 上的 api,因此它跳过了所有测试。
    • 我正在使用 Guzzle,它使用的是 Windows IP 192.x.x.12:83。
    • 现在我已经用我的 Windows IP 192.x.x.12:83 替换了 behat base url,它开始工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-26
      • 1970-01-01
      • 2014-09-03
      • 2021-04-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多