I'm trying to run the Magento 2 Functional Testing Framework (FTF) inside a Vagrant box, but without success.

My setup is a host machine, which runs Selenium and a Vagrant box which runs Magento 2. What I'm currently doing:

  • I'm running Selenium in hub mode on my host machine:
    java -jar selenium-server-standalone-3.0.0-beta3.jar -role hub -port 5555
  • In my guest machine, I'm also running selenium, but as a node (which connects to the hub on my host):
    java -jar /vagrant/selenium-server-standalone-3.0.0-beta3.jar -role node -hub -port 4444

The connection is established, and I see activity in both console windows that they're connected.

But... as soon as I try the out-of-the box functional tests that come bundled with Magento 2, I get the following error in as well PHP as Selenium (node):

Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX

Needless to say, I don't have Firefox installed in my Vagrant box. It is however installed on my host machine (together with some other selenium driven browsers, like Chrome and Safari).

But the fact that I get this error makes me wonder: is the FTF capable of running it's test in a setup like this? Or is it really intended to run native on a system? Or am I perhaps overseeing a simple configuration here?


Here are some more details about my setup:

  • I'm using Vagrant 1.9.1, Virtualbox 5.1.14 and Selenium standalone server 3.0.0-beta3.
  • The forwarded ports are 8080 -> 80, 8443 -> 443, 8025 -> 8025. Note that I don't forward port 4444 nor 5555 (If I'm not mistaken this is not necessary due to the direction of the traffic).
  • The IP address of my host machine (eth0) is
  • My vagrant is setup as a private network on IP
  • The IP address of my guest machine (eth0) is
  • On my host machine, I run selenium as a hub on port 5555. The hub shows Nodes should register to
  • On my guest machine, I run selenium as a node on port 4444. I register it to the hub on Both the node as the hub state that they're connected:


07:57:19.092 INFO - Registering the node to the hub:
07:57:19.110 INFO - The node is registered to the hub and ready to use


08:59:29.590 INFO - Registered a node
08:59:29.590 WARN - Cleaning up stale test sessions on the unregistered node
  • I've edited my etc/config.xml-file and added the following parameters after </install>:


    <item name="selenium"
          browser="Mozilla Firefox"

Now when I run the built-in PHPUnit with FTF, I still get the error message:

PHP Fatal error:  Uncaught PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX
Build info: version: '3.0.0-beta3', revision: 'c7b525d', time: '2016-09-01 14:57:03 -0700'
System info: host: 'magento2', ip: '', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-45-generic', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver in /var/www/public/dev/tests/functional/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:165

I know that the configuration is read, because when I change browser and browserName to Google Chrome and chrome I get the following error:

PHP Fatal error:  Uncaught PHPUnit_Extensions_Selenium2TestCase_WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html in /var/www/public/dev/tests/functional/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/Selenium2TestCase/Driver.php:165

Any help is greatly appreciated.

1 Answer 1


Yes, you can run functional tests inside Vagrant box. You need to follow this guide http://devdocs.magento.com/guides/v2.1/mtf/mtf_quickstart.html for configuring environment.

Note, that selenium with specific browser driver must to be run on host machine, but on guest machine you need to set host machine ip ( for example) as host in config.xml file.

<item name="selenium"
      browser="Google Chrome"

Additionally, you can use headless running of functiona tests on guest machine, using xvfb (on CI server for example).

  • Thanks for your answer. However, I keep getting the error message (PHP Fatal error: Uncaught PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: LINUX). I'll improve my question with further details, perhaps you can help me. Feb 7, 2017 at 7:51
  • Are you run selenium on host machine or guest?
    – Max
    Feb 7, 2017 at 7:59
  • I run Selenium on host as a hub, and on guest as a node. Feb 7, 2017 at 8:04
  • you need to run selenium only on host machine as described in documentation devdocs.magento.com/guides/v2.1/mtf/mtf_quickstart/…. On the guest machine you need to run functional tests (devdocs.magento.com/guides/v2.1/mtf/mtf_quickstart/…), which will connect to selenium on host machine, using config.xml host configuration
    – Max
    Feb 7, 2017 at 8:15
  • Thanks! It works now! I have selenium running on my host machine, and I configured my guest to use on port 4444. Which is strange, because my private network IP is and not .1, but hey... it works. Any thoughts on why I have to use .1 in my guest instead of .101? Feb 7, 2017 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.