无法在虚拟机中运行代码接收-找不到并加载了Mink [英] unable to run codeception in virtual machine -Mink could not be found and loaded
问题描述
我安装了一个vm ubuntu来宾操作系统。
I installed a vm ubuntu guest OS.
我的应用程序是通过主机操作系统中URL所在的浏览器运行的
My app is running from the browser in my host OS at the url
我键入在来宾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.
推荐答案
- SSH进入访客VM。
- SSH into guest VM.
- sudo nano /etc/hosts
- Add in the following
127.0.0.1 abc.localhost
- 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屋!