Skip to content

Commit 98509c1

Browse files
committed
Add documentation, rename yml file
1 parent e549c3f commit 98509c1

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed

configuration/mftf.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,3 @@ To preview the process of testing, you need any **VLC** client that provides **S
3434
### Remmina
3535

3636
![Remmina Configuration](screenshots/remmina-ssh-tunnel.png)
37-
38-
### Allure reports
39-
40-
To access Allure reports generated (automatically updated each 60 seconds), you need to open in your browser:
41-
42-
* https://allure.exampleproject.test/
140 KB
Loading

configuration/tests-reporting.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Tests Reporting
2+
3+
## Allure
4+
5+
[Allure](http://allure.qatools.ru/) is a powerful **test reporting framework**. It is fully compatible with [PHPUnit](https://phpunit.de/) and [Codeception](https://codeception.com/). This means that no all the types of tests available in **Magento 2** can be visualised.
6+
7+
### Configuration
8+
9+
To enable Allure in your project environment, add to your `.env` file:
10+
11+
```
12+
WARDEN_ALLURE=1
13+
```
14+
15+
As a result both `php-fpm` and `php-debug` containers get additional mount `/var/allure-results` where the Test results should be saved.
16+
17+
#### PHPUnit Reports
18+
19+
To visualize your PHPUnit Tests results *(Unit, Integration, API functional, Static)* in Allure, you need to edit `phpunit.xml` file and find `<listeners>` section. If you have `<listener class="Yandex\Allure\Adapter\AllureAdapter">` node, just change the path where logs are saved: `<string>/var/allure-results</string>` (please notice leading `/`).
20+
21+
```xml
22+
<listeners>
23+
<listener class="Magento\TestFramework\Event\PhpUnit"/>
24+
<listener class="Yandex\Allure\Adapter\AllureAdapter">
25+
<arguments>
26+
<string>/var/allure-results</string>
27+
...
28+
```
29+
30+
#### Codeception Reports
31+
32+
Adjusting Codeception reports path is a little bit more complicated. Please find the `dev/tests/acceptance/codeception.yml` file, under `Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter` you'll find `outputDirectory`. Change it's value to `/var/allure-results`.
33+
34+
```yaml
35+
extensions:
36+
config:
37+
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter:
38+
deletePreviousResults: false
39+
outputDirectory: /var/allure-results
40+
```
41+
42+
### Web Interface
43+
44+
Allure reports are available with your Web Browser on `allure` subdomain (eg. `https://allure.magento2.test/`). Reports are generated with 5 seconds interval.
45+
46+
![Example Report generated with Allure](screenshots/allure-reporting.png)

environments/initializing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
3434
REDIS_VERSION=5.0
3535
VARNISH_VERSION=6.0
3636

37+
WARDEN_ALLURE=0
3738
WARDEN_SELENIUM=0
3839
WARDEN_SELENIUM_DEBUG=0
3940
WARDEN_BLACKFIRE=0

0 commit comments

Comments
 (0)