Test run
All tests classified by categories in corresponding directories in <magento2>/dev/tests/functional/tests/app/Magento
.
MTF uses PHPUnit, which is located in <magento2>/dev/tests/functional/vendor/bin
directory.
Be sure that your system is ready for test run.
- Magento is ready for tests
- The Magento Testing Framework is installed
- The Magento Testing Framework is configured
- Environment is ready to test run
Run all tests
Enter in terminal:
phpunit
This command will run all tests from <magento2>/dev/tests/functional/tests/app/Magento/
.
Run particular test
Enter in terminal
phpunit --filter <name of test>
Name of test is the name of PHP file with test.
Example:
Let鈥檚 check creating of new category. For this we should run <magento2>/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php
. To run this test enter the following script in your terminal:
phpunit --filter CreateCategoryEntityTest
Next Steps
<< Prepare environment for test | See logs for failed tests >>
Find us on