Vagrant 幻影+;流浪汉+;共接受

Vagrant 幻影+;流浪汉+;共接受,vagrant,phantomjs,codeception,Vagrant,Phantomjs,Codeception,我想知道是否有人有机会让所有这些(加上laravel和wordpress)在相同的环境下工作(每个页面都在工作,我对laravel和wordpress没有任何问题)。 我的问题是,是否有人的配置以正确的方式工作 这是我每本的复印件 functional.suite.yml acceptance.suite.yml codeception.yml /////////////////////////////////////////////////// 我的幻影JS启动代码 phantomjs--

我想知道是否有人有机会让所有这些(加上laravel和wordpress)在相同的环境下工作(每个页面都在工作,我对laravel和wordpress没有任何问题)。 我的问题是,是否有人的配置以正确的方式工作

这是我每本的复印件 functional.suite.yml
acceptance.suite.yml
codeception.yml ///////////////////////////////////////////////////

我的幻影JS启动代码 phantomjs--webdriver=4444

这是我的错误 [Codeception\Exception\ModuleException]

Db:SQLSTATE[HY000][2002]创建PDO连接时操作超时

如果在vagrant box外部运行codeception,请确保mysql允许从主机系统进行外部连接。这里解释了如何在vagrat box内设置对db的访问,感谢Alex的回答。在问我的问题之前,我看到了这一点,是的,我试过了,但我无法让它工作:(这就是我为什么启动这个线程。感谢任何一种方式的帮助:)你能使用mysql客户端从外部的vagrant box连接到DB吗?顺便问一下,为什么在所有三种配置中使用不同的DNS?它们都指向同一个DB吗?是的,它们都指向同一个DB(127仅用于本地),但都是。是的,我有权访问数据库,但codeception没有使用该技术堆栈(codeception->CentOS->VM->vagrant),甚至数据库位于不同的VM上;一切都按计划进行。您是否可以运行/或套件并通过(验收/功能)?我注意到DBDSN连接配置对于每种类型都是不同的。
class_name: FunctionalTester
modules:
enabled:
    # add framework module here
    - Laravel5
    - Db
    - Dbh
    - Asserts
    - WebDriver:
        url: 'http://vagrant.test.com/'
        host: '127.0.0.1'
        #host: '192.168.56.102'
        browser: phantomjs
        window_size: 1024x768
        port: 4444
        window_size: 'maximize'
        clear_cookies: 1
        restart: 1
    - \Helper\Acceptance

config:
    Db:
        dsn: 'mysql:host=192.168.56.102;dbname=wordpress'
        user: 'wordpress_user'
        password: 'wordpress_password'
        dump: 'tests/_data/dump.sql'
        populate: false
        cleanup: false
        reconnect: true
env:
phantom:
     modules:
        config:
            WebDriver:
                browser: 'phantomjs'

chrome:
     modules:
        config:
            WebDriver:
                browser: 'chrome'
class_name: AcceptanceTester
modules:
enabled:
    # add framework module here
    - Laravel5
    - Asserts
    - WebDriver:
    - \Helper\Acceptance
config:
        Laravel5:
            cleanup: false
            environment: test
        WebDriver:
            browser: phantomjs
            window_size: 1024x768
            url: 'http://vagrant.test.com/'
        Db:
            dsn: 'mysql:host=localhost;dbname=wordpress'
            user: 'wordpress_user'
            password: 'wordpress_password'
            dump: tests/_data/test-dump.sql
            populate: true
            cleanup: false
env:
phantom:
     modules:
        config:
            WebDriver:
                browser: 'phantomjs'

chrome:
     modules:
        config:
            WebDriver:
                browser: 'chrome'
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: true
#ramdomise test order
random: true
memory_limit: 1024M
extensions:
enabled:
    - Codeception\Extension\RunFailed
coverage:
whitelist:
    include:
        - app/*
remote: true
modules:
enabled:
    - Laravel5
    - WebDriver
    - Db
config:
    Db:
        dsn: 'mysql:host=vagrant.test.com;dbname=wordpress'
        user: 'wordpress_user'
        password: 'wordpress_password'
        dump: 'tests/_data/myDump.sql'
        populate: true
        cleanup: true