Codeception\Extension\RunProcess 未启动进程

Codeception\Extension\RunProcess not starting processes

问题:

昨天 Codeception 引入了新的扩展,应该有助于 starting/stopping Selenium 服务器、Chrome 驱动程序等(更多 here)。然而,即使它显示进程正在启动 - 但实际上并没有。

acceptance.suite.yml

class_name: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: http://127.0.0.1:8080/
            browser: chrome
        - Yii2:
            part: orm
            entryScript: index-test.php
            cleanup: false
extensions:
    enabled:
        - Codeception\Extension\RunProcess:
            - java -jar /home/tajgeer/.executables/bin/selenium-server.jar
            - php /home/tajgeer/Repozytoria/Yii2/yii serve

输出:

Acceptance Tests (5)

  [RunProcess] Starting java -jar /home/tajgeer/.executables/bin/selenium-server.jar
  [RunProcess] Starting php /home/tajgeer/Repozytoria/Yii2/yii serve

E AboutCest: Ensure that about works 
E ContactCest: Ensure that contact page works 
E ContactCest: Contact form can be submitted 
E HomeCest: Ensure that home page works 
E LoginCest: Ensure that login works 

  [RunProcess] Stopping php /home/tajgeer/Repozytoria/Yii2/yii serve
  [RunProcess] Stopping java -jar /home/tajgeer/.executables/bin/selenium-server.jar

示例错误:

[ConnectionException] Can't connect to Webdriver at http://127.0.0.1:4444/wd/hub. Please make sure that Selenium Server or PhantomJS is running.

我已经尝试为两位执行官设置 o+x 权限 - 没有任何改变。当我尝试使用输入的命令 运行 这两个工具时 - 一切正常。

谁能指出我做错了什么?

解决方案:

其实...我已经自己解决了。我忘记了 sleep(进程甚至没有机会 运行,因为测试非常快)。我已将 acceptance.suite.xml 更改为以下内容:

class_name: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: http://127.0.0.1:8080/
            browser: chrome
        - Yii2:
            part: orm
            entryScript: index-test.php
            cleanup: false
extensions:
    enabled:
        - Codeception\Extension\RunProcess:
            0: java -jar /home/tajgeer/.executables/bin/selenium-server.jar
            1: php /home/tajgeer/Repozytoria/Yii2/yii serve
            sleep: 5