Quick start. Test run

All tests classified by categories in corresponding directories in <magento2_root_dir>/dev/tests/functional/tests/app/Magento.

FTF uses PHPUnit, which is located in <magento2_root_dir>/dev/tests/functional/vendor/bin directory.

Be sure that your system is ready for test run.

Run all tests

Enter in terminal:

cd <magento2_root_dir>/dev/tests/functional
vendor/bin/phpunit

This command will run all tests from <magento2_root_dir>/dev/tests/functional/tests/app/Magento/.

Run particular test

Enter in terminal:

cd <magento2_root_dir>/dev/tests/functional
vendor/bin/phpunit --filter <name of test>

Name of test is the name of PHP file with test.

Example:

Let’s check creating of new category. For this we should run <magento2_root_dir>/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php. To run this test enter the following script in your terminal:

cd <magento2_root_dir>/dev/tests/functional
vendor/bin/phpunit --filter CreateCategoryEntityTest

Next Steps

<< Prepare environment for test See logs for failed tests >>