无法在虚拟机中运行代码接收-找不到并加载了Mink [英] unable to run codeception in virtual machine -Mink could not be found and loaded

查看:95
本文介绍了无法在虚拟机中运行代码接收-找不到并加载了Mink的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I installed a vm ubuntu guest OS.

我的应用程序是通过主机操作系统中URL所在的浏览器运行的

My app is running from the browser in my host OS at the url

http://abc.localhost:8888

我键入在来宾OS终端中运行的
php codecept.phar。

I type php codecept.phar run in the guest OS terminal.

我收到以下错误:

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

我的accepting.yml说

My acceptance.yml says

# 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'

I在accepting.suite.yml中尝试使用和不使用8888。我也遇到同样的错误。

I have tried with and without the 8888 in the acceptance.suite.yml. I get the same error.

请告知。

注意:我也交叉张贴了同一张票在 https://github.com/Codeception/Codeception/issues/388 中。

Caveat: I have also cross-posted the same ticket in https://github.com/Codeception/Codeception/issues/388. Will update this question should I get answer from there.

推荐答案


  1. SSH进入访客VM。
  1. SSH into guest VM.
  2. sudo nano /etc/hosts
  3. Add in the following 127.0.0.1 abc.localhost
  4. Ensure acceptance.yml is correct.




# 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

Then you run the command php codecept.phar run inside your guest vm

这篇关于无法在虚拟机中运行代码接收-找不到并加载了Mink的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆