有一个类似的问题,但不适用于我,因为我使用的是代码接收版本2.3.9。 Class PhpStorm_Codeception_ReportPrinter does not exist
话虽如此,我已经在docker容器上设置了远程php解释器和远程代码接收。当我去运行验收测试时,我得到:
Testing started at 12:43 AM ...
docker://automation_environment:latest/php /opt/.phpstorm_helpers/codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-ansi --no-interaction tests/mjp_acceptance
==== Redirecting to Composer-installed version in vendor/codeception ====
Codeception PHP Testing Framework v2.3.9
Powered by PHPUnit 6.5.13 by Sebastian Bergmann and contributors.
In Runner.php line 174:
Class PhpStorm_Codeception_ReportPrinter does not exist
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--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] [--] [<suite>] [<test>]
Fatal error: Uncaught RuntimeException: Command Did Not Finish Properly in /opt/project/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php on line 101
Call Stack:
0.0003 395640 1. {main}() /opt/.phpstorm_helpers/codeception.php:0
0.0006 421800 2. require_once('/var/automation/vendor/codeception/codeception/autoload.php') /opt/.phpstorm_helpers/codeception.php:24
0.5967 4744624 3. require('/opt/project/vendor/codeception/codeception/package/bin') /var/automation/vendor/codeception/codeception/autoload.php:12
0.9052 7553016 4. Codeception\Application->run() /opt/project/vendor/codeception/codeception/package/bin:37
0.9052 7553016 5. Codeception\Application->run() /opt/project/vendor/codeception/codeception/src/Codeception/Application.php:108
RuntimeException: Command Did Not Finish Properly in /opt/project/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php on line 101
Call Stack:
0.0003 395640 1. {main}() /opt/.phpstorm_helpers/codeception.php:0
0.0006 421800 2. require_once('/var/automation/vendor/codeception/codeception/autoload.php') /opt/.phpstorm_helpers/codeception.php:24
0.5967 4744624 3. require('/opt/project/vendor/codeception/codeception/package/bin') /var/automation/vendor/codeception/codeception/autoload.php:12
0.9052 7553016 4. Codeception\Application->run() /opt/project/vendor/codeception/codeception/package/bin:37
0.9052 7553016 5. Codeception\Application->run() /opt/project/vendor/codeception/codeception/src/Codeception/Application.php:108
1.9287 12880104 6. Codeception\Subscriber\ErrorHandler->shutdownHandler() /opt/project/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:0
Process finished with exit code 255
我已经删除并重新添加了PHP Storm中的解释器。还是没有运气
答案 0 :(得分:1)
我从此错误消息中得到线索:
====重定向到供应商/代码接收中Composer安装的版本====
并从旧版本的PhpStorm Codeception插件中获得了here (我不记得如何从PhpStorm中提取它。)
似乎您已将PhpStorm配置为运行codeception.phar,但您也将Codeception安装为Composer依赖项。因此,PhpStorm尝试运行codecept.phar,并跳过了其余的codeception.php,包括PhpStorm_Codeception_ReportPrinter
类的声明。
我的建议是将Path to Codeception executable
设置为vendor/codeception/codeception/codecept
。