【问题标题】:Yii2 acceptance test - Notice errorsYii2 验收测试 - 注意错误
【发布时间】:2023-04-09 16:29:01
【问题描述】:

我正在尝试运行正文为空的验收测试:

class ContactCept
{
    public function frontpageWorks(AcceptanceTester $I)
    {

    }
}

这是我的acceptance.suite.yml:

class_name: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: http://localhost/website/
            browser: chrome
        - Yii2:
            part: orm
            entryScript: index-test.php
            cleanup: false

我的 xampp 正在运行,我可以访问 http://localhost/website/

Selenium 服务器已启动并正在运行。

当我运行命令 vendor/bin/codecept 运行接受时,我的测试完成并出现错误 Undefined index: HTTP_HOST

PS:Chrome 正在使用 url 数据打开:;

我的问题是:我可以禁用“通知”类型的错误并且只有“错误”级别吗?

【问题讨论】:

    标签: selenium testing yii2 acceptance-testing


    【解决方案1】:

    找到了。在 Acceptance.yml 中添加一行:

    error_level: "E_ERROR"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-17
      • 1970-01-01
      • 2017-06-03
      • 2015-08-14
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 2011-04-12
      相关资源
      最近更新 更多