Skip to content

Commit 44cd1d2

Browse files
Mohit.k.SharmaMohit.k.Sharma
Mohit.k.Sharma
authored and
Mohit.k.Sharma
committed
MQE-1693 | Doc added for generate test by json file
1 parent 6ae60b1 commit 44cd1d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/commands/mftf.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ vendor/bin/mftf generate:tests [option] [<test name>] [<test name>] [--remove]
173173
| `--force` | Forces test generation, regardless of the module merge order defined in the Magento instance. Example: `generate:tests --force`. |
174174
| `-i,--time` | Set time in minutes to determine the group size when `--config=parallel` is used. <br/>Example: `generate:tests --config=parallel --time=15` <br/>Option `--time` will be the default and the __default value__ is `10` when neither `--time` nor `--groups` is specified. <br/>Example: `generate:tests --config=parallel`|
175175
| `-g,--groups` | Set number of groups to be split into when `--config=parallel` is used. <br>Example: `generate:tests --config=parallel --groups=300` <br/>Options `--time` and `--groups` are mutually exclusive and only one should be used.|
176-
| `--tests` | Defines the test configuration as a JSON string.|
176+
| `--tests` | Defines the test configuration as a JSON string or JSON file path.|
177177
| `--allow-skipped` | Allows MFTF to generate and run tests marked with `<skip>.`|
178178
| `--debug` | Performs schema validations on XML files. <br/> DEFAULT: `generate:tests` implicitly performs schema validation on merged files. It does not indicate the file name where the error is encountered. <br/> DEVELOPER: `--debug` performs per-file validation and returns additional debug information (such as the filename where an error occurred) when test generation fails because of an invalid XML schema. This option takes extra processing time. Use it after test generation has failed once.<br/>|
179179
| `-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.|
@@ -224,12 +224,20 @@ Complex configuration to generate a few non-suite tests, a single test in a suit
224224

225225
The command that encodes this complex configuration:
226226

227+
Command to generate test by json string:
228+
227229
```bash
228230
vendor/bin/mftf generate:tests --tests '{"tests":["general_test1","general_test2","general_test3"],"suites":{"sample":["suite_test1"],"sample2":null}}'
229231
```
230232

231233
Note that the strings must be escaped and surrounded in quotes.
232234

235+
Command to generate test by json file:
236+
237+
```bash
238+
vendor/bin/mftf generate:tests --tests ./foldername/filename.json
239+
```
240+
233241
### `generate:suite`
234242

235243
#### Description

0 commit comments

Comments
 (0)