layout | group | subgroup | title | menu_title | menu_node | menu_order | version | github_link | redirect_from |
---|---|---|---|---|---|---|---|---|---|
default |
config-guide |
04_CLI |
Run unit tests |
Run unit tests |
400 |
2.0 |
config-guide/cli/config-cli-subcommands-test.md |
/guides/v1.0/config-guide/cli/config-cli-subcommands-test.html |
Whenever a not supported type is specified, the program terminates and lists all available types.
Following execution, a detailed report displays showing the test run and results.
Before you run this command, all of the following must be true:-
The
Magento_Developer
module must be enabled. You can enable it as follows:magento module:enable [--force] Magento_Developer
Use the
--force
option only if it's necessary. -
Your system must be set up to run the desired tests.
For example, to run integration tests, you should copy
dev/tests/integration/etc/install-config-mysql.php.dist
todev/tests/integration/etc/install-config-mysql.php
and modify it to suit your environment.
magento dev:tests:run <test>
To list the available test types, enter
magento dev:tests:run --help
This gives you a list similar to the following:
all, unit, integration, integration-all, static, static-all, integrity, legacy, default
For example, to run integration tests, enter
magento dev:tests:run integration