Magento provides several types of tests out of the box. We can see a list of these tests on running the following command on the console in the Magento root folder:
php bin/magento dev:tests:run –help
The result of the command is an output that looks like this:
Usage: dev:tests:run [type] Arguments: type Type of test to run. Available types: all, unit, integration, integration-all, static, static-all, integrity, legacy, default (default: "default")
This output originates from the Console/Command/DevTestsRunCommand.php
file in the core Magento_Developer
module. Looking at the output, we might say that there are actually nine types of tests, which are as follows:
all
unit
integration
integration-all
static
static-all
integrity
legacy
default
However, these are not unique types of tests; these are combinations, as we will soon see.
Let's take a closer look at the code in the DevTestsRunCommand
class and its setupTestInfo
method.
The setupTestInfo
method defines the internal commands
property...