4

我安装了一个 vm ubuntu 来宾操作系统。

我的应用程序正在我的主机操作系统中的浏览器中运行,网址为

http://abc.localhost:8888

我在来宾操作系统终端中键入 php codecept.phar run。

我收到以下错误:

[Codeception\Exception\Configuration]  
  Mink could not be found and loaded  

我的acceptance.yml 说

# Codeception Test Suite Configuration

# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).

# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.

class_name: WebGuy
modules:
    enabled:
        - PhpBrowser
        - WebHelper
        - Mink
    config:
        PhpBrowser:
           url: 'http://abc.localhost:8888'

我在acceptance.suite.yml 中尝试过使用和不使用8888。我犯了同样的错误。

请指教。

警告:我还在https://github.com/Codeception/Codeception/issues/388中交叉发布了同一张票。如果我从那里得到答案,将更新这个问题。

4

1 回答 1

4
  1. SSH 进入来宾虚拟机。
  2. 须藤纳米 /etc/hosts
  3. 添加以下内容127.0.0.1 abc.localhost
  4. 确保acceptance.yml 是正确的。
# Codeception Test Suite Configuration

# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).

# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.

class_name: WebGuy
modules:
    enabled:
        - PhpBrowser
        - WebHelper
    config:
        PhpBrowser:
           url: 'http://abc.localhost'

然后php codecept.phar run在来宾 vm中运行命令

于 2013-06-25T01:44:13.883 回答