Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm Codeception run arguments

I got PhpStorm with Codeception framework. When I run an Acceptance tests there are default options generated by the IDE :

C:\xampp\php\php.exe C:/.../Temp/ide-codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-ansi --no-interaction -c C:...\codeception.yml acceptance

How can I overload this configuration (especially --no-ansi and --no-interaction)?

I have try in "Run/Debug Configurations" and "Test runner options" but it's not working.

like image 904
Jacques Mivi Avatar asked Oct 18 '22 13:10

Jacques Mivi


1 Answers

That's a good question, but I think it is not possible without hacking the plugin. The command line is launched by the plugin : phpstorm/plugins/codeception/lib/codeception.jar

You can download it here https://plugins.jetbrains.com/plugin/9515-codeception-framework

If you read the java CodeceptionRunConfigurationHandler.class file, you can see the prepareCommand() method :

    command.setScript(scriptFile, false);
    command.addArgument("run");

    if ((StringUtil.isNotEmpty(version)) && (PhpTestFrameworkVersionDetector.versionCompare(version, "2.2.6") >= 0))
    {
      command.addArgument("--report");
      command.addArgument("-o");
      command.addArgument("reporters: report: PhpStorm_Codeception_ReportPrinter");
    }

    command.addArgument("--no-ansi");
    command.addArgument("--no-interaction");
    command.addEnv("IDE_CODECEPTION_EXE", exe);
like image 163
Arno Avatar answered Oct 24 '22 05:10

Arno