You are reading the documentation for version 2.2. Magento 2.3 is the latest version available. Ensure you are reading the documentation for your version of Magento.

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:

1
cd <magento2_root_dir>/dev/tests/functional
1
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:

1
cd <magento2_root_dir>/dev/tests/functional
1
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:

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

Next Steps

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