错误assert:assertsizeof$ failures== 1失败,停止代码接收测试

问题描述

有时,在为测试添加断言时,我在测试运行期间收到以下错误消息,该消息会停止执行测试

Testing started at 14:28 ...
C:\xampp\PHP\PHP.exe C:/Users/georg/AppData/Local/Temp/ide-codeception.PHP run --report -o "reporters: report: PHPStorm_Codeception_ReportPrinter" --no-interaction -c C:/Users/georg/Documents/CMS_Automation_Tests/codeception.yml "tests\regression\features\ArticleTests.feature:Create a new article and fill out all available fields"
Codeception PHP Testing Framework v4.1.7
Powered by PHPUnit 9.3.8 by Sebastian Bergmann and contributors.
Running with seed: 
In ErrorHandler.PHP line 83:
assert(): assert(sizeof($failures) == 1) Failed
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--PHPunit-xml [PHPUNIT-XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--bootstrap [BOOTSTRAP]] [--no-redirect] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--coverage-PHPunit [COVERAGE-PHPUNIT]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--seed SEED] [--no-artifacts] [--] [<suite> [<test>]]

我没有找到有关此错误的任何信息。它似乎与我的代码中没有任何特定错误有关。

enter image description here

我的composer.json在下面:

{
    "name": "cms/automation","type": "project","require": {
        "PHP": "^7.2","ext-json": "*","fzaninotto/faker": "^1.7","PHP-webdriver/webdriver": "^1.8@dev","ext-curl": "*","ext-zip": "*","ext-mb$ vendor/bin/behat -V\nstring": "*","facebook/webdriver": "1.7"
    },"require-dev": {
        "PHPunit/PHPunit": "^6.5","mockery/mockery": "~0.9","codeception/codeception": "^4.1","codeception/base": "^2.4","symfony/var-dumper": "^4.1","behat/behat": "^3.6"
    },"autoload": {
        "psr-4": {
            "App\\": "app/"
        }
    },"autoload-dev": {
        "classmap": [
            "tests/"
        ]
    },"minimum-stability": "dev","prefer-stable": true
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...