This page discusses how to run tests using the MTF.
Install and configure the MTF as discussed in Installing and Configuring the Magento Test Framework (MTF).
-
Make sure your Magento 2 code is up-to-date.
-
Change to the
dev/tests/functional
directory and runcomposer update
composer update
updates any dependencies that otherwise prevent tests from running successfully. -
Start Selenium (which should have been downloaded for you by Composer). Selenium can be found under the
dev/tests/functional/vendor/netwing/selenium-server-standalone
directory.Example of starting Selenium:
java -jar vendor/netwing/selenium-server-standalone/selenium-server-standalone-2.39.0.jar
-
Start your tests using PHPUnit. This can be done using your IDE or the command line.
Example using the command line:
cd dev/tests/functional phpunit