0

Magento 2 automatic run test for specific module

Spread the love

magento 2 automated testing,magento 2 integration tests,magento 2 phpunit,magento 2 testing framework,magento unit testing,magento 2 unit testing phpstorm,magento 2 unit test model

if you are looking for a way to run the tests for a specific module only then please read this post till end.

Magento 2 use phpunit framework for running test. You can run test per type and module with command:

For example:

  • to run unit test for Catalog, you need run commandvendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Magento/Catalog/Test/Unit/
  • to run integration test for Catalog, you need run vendor/phpunit/phpunit/phpunit -c dev/tests/integration/phpunit.xml.dist dev/tests/integration/testsuite/Magento/Catalog

Currently only unit test moved to modules. Also static and integration integrity test is working with all magento code.

Leave a Reply

Your email address will not be published. Required fields are marked *