类PhpStorm_Codeception_ReportPrinter不存在

时间:2018-04-26 13:58:50

标签: phpstorm codeception phpstorm-2018.1

我正在尝试在PhpStorm中运行Codeception功能测试,并继续收到一个错误,指出缺少一个类。我已经浏览过互联网,除了一篇帖子https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000646104-Running-codeCeption-test-runner-causes-excpetion?sort_by=created_at外,没有找到任何可用的问题。其他帖子谈论如何设置论点。

我有一个Codeception 2.4.1的phar和它的作曲家安装。它使用PHP版本7.1来执行。

搜索vendor文件夹不会返回这样的类,这使我认为应该从PhpStorm中传递或包含它。不太确定,抓住稻草。

如果有人对此有任何接触并可以提供一些指导,我们将不胜感激。我可以运行docker / vagrant配置或从CLI运行它,它只是无法与PhpStorm集成。

C:\php\php-7.1.4-Win32-VC14-x64\php.exe -d-dxdebug.remote_mode=jit C:/Users/Curtis/AppData/Local/Temp/ide-codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-ansi --no-interaction functional

==== Redirecting to Composer-installed version in vendor/codeception ====
Codeception PHP Testing Framework v2.4.1
Powered by PHPUnit 5.7.27 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>]

PHP Fatal error:  Uncaught RuntimeException: Command Did Not Finish Properly in C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Subscriber\ErrorHandler.php:101
Stack trace:
#0 [internal function]: Codeception\Subscriber\ErrorHandler->shutdownHandler()
#1 {main}
  thrown in C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Subscriber\ErrorHandler.php on line 101
PHP Stack trace:
PHP   1. {main}() C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:0
PHP   2. require_once() C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:21
PHP   3. require() phar://C:/Users/Curtis/Projects/tripadvisor-integration/codecept.phar/autoload.php:12
PHP   4. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\package\bin:37
PHP   5. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Application.php:108

Fatal error: Uncaught RuntimeException: Command Did Not Finish Properly in C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Subscriber\ErrorHandler.php on line 101

Call Stack:
    0.2024     403184   1. {main}() C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:0
    0.2208    1243848   2. require_once('phar://C:/Users/Curtis/Projects/tripadvisor-integration/codecept.phar/autoload.php') C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:21
    0.2862    5654840   3. require('C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\package\bin') phar://C:/Users/Curtis/Projects/tripadvisor-integration/codecept.phar/autoload.php:12
    0.3338    8056520   4. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\package\bin:37
    0.3338    8056520   5. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Application.php:108

RuntimeException: Command Did Not Finish Properly in C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Subscriber\ErrorHandler.php on line 101

Call Stack:
    0.2024     403184   1. {main}() C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:0
    0.2208    1243848   2. require_once('phar://C:/Users/Curtis/Projects/tripadvisor-integration/codecept.phar/autoload.php') C:\Users\Curtis\AppData\Local\Temp\ide-codeception.php:21
    0.2862    5654840   3. require('C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\package\bin') phar://C:/Users/Curtis/Projects/tripadvisor-integration/codecept.phar/autoload.php:12
    0.3338    8056520   4. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\package\bin:37
    0.3338    8056520   5. Codeception\Application->run() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Application.php:108
    0.6265   17565136   6. Codeception\Subscriber\ErrorHandler->shutdownHandler() C:\Users\Curtis\Projects\tripadvisor-integration\vendor\codeception\codeception\src\Codeception\Subscriber\ErrorHandler.php:0


Process finished with exit code -1

1 个答案:

答案 0 :(得分:2)

在我的情况下,我将codeception安装在composer global中和作为项目依赖项。

我必须删除composer global remove codeception/codeception并转到PHPStorm->设置->语言和框架-> PHP->测试框架,然后将我的代码接收可执行文件更改为~/myprojectpath/vendor/codeception/codeception/codecept