0

There is a similar question but that does not apply here as I am using codeception version 2.3.9. Class PhpStorm_Codeception_ReportPrinter does not exist

That being said, I have set up remote php interpreter and remote codeception on a docker container. When I go to run acceptance tests, I get:

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

I have removed and re-added the interpreters on php storm. Still no luck

kratos
  • 2,465
  • 2
  • 27
  • 45

1 Answers1

1

I'm taking a clue from this error message:

==== Redirecting to Composer-installed version in vendor/codeception ====

and from the old version of PhpStorm Codeception plugin that I've got here (I can't remember how to extract it from PhpStorm).

It looks like you have PhpStorm configured to run codeception.phar, but you got Codeception installed as Composer dependency too. Because of that PhpStorm tries to run codecept.phar and it skips the rest of codeception.php including declaration of PhpStorm_Codeception_ReportPrinter class.

My advice is to set Path to Codeception executable to vendor/codeception/codeception/codecept.

Naktibalda
  • 13,705
  • 5
  • 35
  • 51
  • I have PHPstorm configured to use vendor/codeception/codeception/codecept under test frameworks – kratos Oct 23 '18 at 12:17
  • 1
    Ahhhhh I finally got it to work. For some reason I had a bunch of paths in the include path on the PHP setting in PHPSTORM setup. Clearing them out and readding the remote codeception worked. Thanks for your help. – kratos Oct 23 '18 at 12:30
  • Does not work.I keep getting: "The value of Codeception executable is specified, but file doesn't exist 'vendor/codeception/codeception/codecept'" The fine definitely exists. – mae Jun 10 '21 at 14:07