Php Codeception\Extension\RunProcess未启动进程

Php Codeception\Extension\RunProcess未启动进程,php,yii2,codeception,Php,Yii2,Codeception,问题: 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 cont

问题:

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.
昨天Codeception引入了新的扩展,它应该有助于启动/停止Selenium服务器、Chrome驱动程序等(更多)。然而,即使它表明进程正在启动——实际上它们并没有启动

接受.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.
示例错误:

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权限-没有更改任何内容。当我试图使用输入的命令运行这两个工具时,一切都很好


有人能指出我做错了什么吗?

解决方案:

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.
实际上。。。我自己解决了。我忘记了
睡眠
(进程甚至没有机会运行,因为测试非常快)。我已将
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

解决方案:

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.
实际上。。。我自己解决了。我忘记了
睡眠
(进程甚至没有机会运行,因为测试非常快)。我已将
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

我试过了,但没用。对于同一问题,还有其他解决方案吗?谢谢!睡眠对我来说很有用。在《我曾经尝试过》中提到过,但它不起作用。对于同一问题,还有其他解决方案吗?谢谢!睡眠对我来说很有用。这一点在报告中提到