You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reporting.md
+15-22Lines changed: 15 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The `mftf` tool logs output continuously to the `dev/tests/acceptance/mftf.log`
18
18
19
19
## Command line
20
20
21
-
The MFTF reports about its progress during test run when you run the `mftf` CLI tool with [`run:test`][] or [`run:group`][] commands.
21
+
MFTF reports about its progress during test run when you run the `mftf` CLI tool with [`run:test`][] or [`run:group`][] commands.
22
22
23
23
The report can contain three main parts:
24
24
@@ -35,14 +35,7 @@ The following sections demonstrate an example interpretation of a complete log s
35
35
36
36
### Pre-run check report
37
37
38
-
First, the MFTF reports about issues with environment.
39
-
In our case, there is an issue with PHP library loading.
40
-
41
-
```terminal
42
-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/pecl/20160303/php_intl.dll' - dlopen(/usr/local/lib/php/pecl/20160303/php_intl.dll, 9): image not found in Unknown on line 0
43
-
```
44
-
45
-
Next, the MFTF returns `DEPRECATION` reports alerting you that required test components are missing in XML test definitions.
38
+
First, MFTF returns `DEPRECATION` warnings alerting you that required test components are missing in XML test definitions.
46
39
47
40
```terminal
48
41
DEPRECATION: Test AdminFilteringCategoryProductsUsingScopeSelectorTest is missing required annotations.{"testName":"AdminFilteringCategoryProductsUsingScopeSelectorTest","missingAnnotations":"stories"}
@@ -51,7 +44,7 @@ DEPRECATION: Test AdminRemoveProductWeeeAttributeOptionTest is missing required
51
44
Generate Tests Command Run
52
45
```
53
46
54
-
`Generate Tests Command Run` indicates the moment when the MFTF has run the tests generation command actually.
47
+
`Generate Tests Command Run` indicates that test generation is finished and tests are able to be executed.
After the test generation command (mentioned in the previous section), the MFTF delegates control to the `vendor/codeception` tool, which is the `Codeception PHP Testing Framework` of version `2.3.9` that uses `PHPUnit` of version `6.5.13`.
68
+
After the test generation command (mentioned in the previous section), MFTF delegates control to the `vendor/codeception` tool, which is the `Codeception PHP Testing Framework` of version `2.3.9` that uses `PHPUnit` of version `6.5.13`.
76
69
77
70
The tool runs `2 Tests` using the configuration defined in the `functional` suite under the `Magento\FunctionalTestingFramework` namespace.
78
71
The corresponding configuration file is `acceptance/tests/functional.suite.yml`.
@@ -154,7 +147,7 @@ I save screenshot
154
147
FAIL
155
148
```
156
149
157
-
When a test step fails, the MFTF always saves a screenshot of the web page with the failing state immediately after the failure occurs.
150
+
When a test step fails, MFTF always saves a screenshot of the web page with the failing state immediately after the failure occurs.
158
151
`I save screenshot` follows the failing test step `I see "#something"` in our case.
159
152
160
153
A screenshot of the fail goes at the `acceptance/tests/_output` directory in both PNG and HTML formats:
@@ -176,7 +169,7 @@ Actions after `FAIL` are run as a part of the [`after`][] hook of the test.
176
169
177
170
### Test result report
178
171
179
-
After the MFTF completed test execution, it generates a general report about test results along with detailed information about each fail.
172
+
After MFTF completed test execution, it generates a general report about test results along with detailed information about each fail.
@@ -192,7 +185,7 @@ First you see warnings and deprecations.
192
185
The `DEPRECATION` here is thrown by an MFTF dependency (Symfony) that is out of the scope for test writers and should be considered by MFTF contributors.
193
186
If you encounter this type of reporting, [report an issue][].
194
187
195
-
Then, the MFTF reports that the test run took 52.43 seconds using 16 MB of system RAM.
188
+
Then, MFTF reports that the test run took 52.43 seconds using 16 MB of system RAM.
196
189
And, finally, that there was `1 failure`.
197
190
198
191
Next, the report provides details about the test failure.
@@ -268,19 +261,25 @@ FAILURES!
268
261
Tests: 2, Assertions: 3, Failures: 1.
269
262
```
270
263
271
-
The MFTF encountered failures due to the last test run, that included *2* tests with *3* assertions.
264
+
MFTF encountered failures due to the last test run, that included *2* tests with *3* assertions.
272
265
*1* assertion fails.
273
266
274
267
## Allure
275
268
276
-
Each time you run tests, the MFTF appends an XML file with results at the `tests/_output/allure-results/` directory.
269
+
Each time you run tests, MFTF appends an XML file with results at the `tests/_output/allure-results/` directory.
277
270
278
271
The official [Allure Test Report][] documentation is well-covered, so we'll list only the CLI commands that you would need for your day-to-day work.
279
272
280
273
<divclass="bs-callout bs-callout-info">
281
274
The following commands are relative to the Magento installation directory.
282
275
</div>
283
276
277
+
To generate the HTML Allure report in a temporary folder and open the report in your default web browser:
0 commit comments