Skip to content

Commit 31adf3c

Browse files
authored
Merge pull request #341 from magento/MQE-810-DOCS
MQE-810: Create a static test to validate references between modules
2 parents f6b64c8 + f4f2953 commit 31adf3c

File tree

1 file changed

+33
-19
lines changed

1 file changed

+33
-19
lines changed

docs/commands/mftf.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ This command cleans up the previously generated tests; generates and runs the te
6868
For more details about `failed`, refer to [Reporting][].
6969

7070
### Generate documentation for action groups
71+
7172
```bash
7273
vendor/bin/mftf generate:docs
7374
```
@@ -115,14 +116,14 @@ vendor/bin/mftf generate:tests [option] [<test name>] [<test name>] [--remove]
115116

116117
#### Options
117118

118-
| Option | Description |
119-
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120-
| `--config=[<default>|<singleRun>|<parallel>]` | Creates a single manifest file with a list of all tests. The default location is `tests/functional/Magento/FunctionalTest/_generated/testManifest.txt`.<br/> You can split the list into multiple groups using `--config=parallel`; the groups will be generated in `_generated/groups/` like `_generated/groups/group1.txt, group2.txt, ...`.</br> Available values: `default` (default), `singleRun`(same as `default`), and `parallel`.</br> Example: `generate:tests --config=parallel`. |
121-
| `--force` | Forces test generation, regardless of the module merge order defined in the Magento instance. Example: `generate:tests --force`. |
122-
| `-i,--time` | Set time in minutes to determine the group size when `--config=parallel` is used. The __default value__ is `10`. Example: `generate:tests --config=parallel --time=15` |
123-
| `--tests` | Defines the test configuration as a JSON string. |
124-
| `--debug` | Returns additional debug information (such as the filename where an error occurred) when test generation fails because of an invalid XML schema. This parameter takes extra processing time. Use it after test generation has failed once. |
125-
| `-r,--remove` | Removes the existing generated suites and tests cleaning up the `_generated` directory before the actual run. For example, `generate:tests SampleTest --remove` cleans up the entire `_generated` directory and generates `SampleTest` only. |
119+
| Option | Description|
120+
| ---| --- |
121+
| `--config=[<default> or <singleRun> or <parallel>]` | Creates a single manifest file with a list of all tests. The default location is `tests/functional/Magento/FunctionalTest/_generated/testManifest.txt`.<br/> You can split the list into multiple groups using `--config=parallel`; the groups will be generated in `_generated/groups/` like `_generated/groups/group1.txt, group2.txt, ...`.</br> Available values: `default` (default), `singleRun`(same as `default`), and `parallel`.</br> Example: `generate:tests --config=parallel`. |
122+
| `--force` | Forces test generation, regardless of the module merge order defined in the Magento instance. Example: `generate:tests --force`. |
123+
| `-i,--time` | Set time in minutes to determine the group size when `--config=parallel` is used. The __default value__ is `10`. Example: `generate:tests --config=parallel --time=15`|
124+
| `--tests` | Defines the test configuration as a JSON string.|
125+
| `--debug` | Returns additional debug information (such as the filename where an error occurred) when test generation fails because of an invalid XML schema. This parameter takes extra processing time. Use it after test generation has failed once. |
126+
| `-r,--remove`| Removes the existing generated suites and tests cleaning up the `_generated` directory before the actual run. For example, `generate:tests SampleTest --remove` cleans up the entire `_generated` directory and generates `SampleTest` only.|
126127

127128
#### Examples of the JSON configuration
128129

@@ -131,7 +132,7 @@ The configuration to generate a single test with no suites:
131132
```json
132133
{
133134
"tests":[
134-
"general_test1" //Generate the "general_test1" test.
135+
"general_test1" //Generate the "general_test1" test.
135136
],
136137
"suites": null
137138
}
@@ -141,10 +142,10 @@ The configuration to generate a single test in the suite:
141142

142143
```json
143144
{
144-
"tests": null, // No tests outside the suite configuration will be generated.
145+
"tests": null, // No tests outside the suite configuration will be generated.
145146
"suites":{
146-
"sample":[ // The suite that contains the test.
147-
"suite_test1" // The test to be generated.
147+
"sample":[ // The suite that contains the test.
148+
"suite_test1" // The test to be generated.
148149
]
149150
}
150151
}
@@ -159,11 +160,11 @@ Complex configuration to generate a few non-suite tests, a single test in a suit
159160
"general_test2",
160161
"general_test3"
161162
],
162-
"suites":{ //Go to suites.
163-
"sample":[ //Go to the "sample" suite.
164-
"suite_test1" //Generate the "suite_test1" test.
163+
"suites":{ //Go to suites.
164+
"sample":[ //Go to the "sample" suite.
165+
"suite_test1" //Generate the "suite_test1" test.
165166
],
166-
"sample2":[] //Generate all tests in the "sample2" suite.
167+
"sample2":[] //Generate all tests in the "sample2" suite.
167168
}
168169
}
169170
```
@@ -190,8 +191,8 @@ vendor/bin/mftf generate:suite <suite name> [<suite name>] [--remove]
190191

191192
#### Options
192193

193-
| Option | Description |
194-
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
194+
| Option | Description |
195+
| --- | --- |
195196
| `-r,--remove` | Removes the existing generated suites and tests cleaning up the `_generated` directory before the actual run. For example, `vendor/bin/mftf generate:suite WYSIWYG --remove` cleans up the entire `_generated` directory and generates `WYSIWYG` only. |
196197

197198
#### Example
@@ -253,7 +254,6 @@ vendor/bin/mftf generate:docs [--clean] [--output=/path/to/alternate/dir]
253254
vendor/bin/mftf generate:docs --clean
254255
```
255256

256-
257257
### `reset`
258258

259259
#### Description
@@ -389,6 +389,20 @@ vendor/bin/mftf setup:env
389389

390390
The example parameters are taken from the `etc/config/.env.example` file.
391391

392+
### `static:checks`
393+
394+
Runs all MFTF static:checks on the test codebase that MFTF is currently attached to.
395+
396+
#### Existing static checks
397+
398+
* Test Dependency: Checks that test dependencies do not violate Magento module's composer dependencies.
399+
400+
#### Usage
401+
402+
```bash
403+
vendor/bin/mftf static:checks
404+
```
405+
392406
### `upgrade:tests`
393407

394408
Applies all the MFTF major version upgrade scripts to test components in the given path (`test.xml`, `data.xml`, etc).

0 commit comments

Comments
 (0)