File tree Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 3
3
"magento/mtf" : " 1.0.0-rc56" ,
4
4
"php" : " 7.0.2|~7.0.6|~7.1.0" ,
5
5
"phpunit/phpunit" : " ~4.8.0|~5.5.0" ,
6
- "phpunit/phpunit-selenium" : " >=1.2"
6
+ "phpunit/phpunit-selenium" : " >=1.2" ,
7
+ "allure-framework/allure-phpunit" : " ~1.2.0"
7
8
},
8
9
"suggest" : {
9
10
"netwing/selenium-server-standalone" : " dev-master" ,
Original file line number Diff line number Diff line change 26
26
</arguments >
27
27
</listener >
28
28
<listener class =" Magento\Mtf\System\Event\StateListener" />
29
+ <listener class =" Yandex\Allure\Adapter\AllureAdapter" >
30
+ <arguments >
31
+ <string >var/allure-results</string > <!-- XML files output directory -->
32
+ <boolean >false</boolean > <!-- Whether to delete previous results on rerun -->
33
+ <array > <!-- A list of custom annotations to ignore (optional) -->
34
+ <element key =" 0" >
35
+ <string >ZephyrId</string >
36
+ </element >
37
+ <element key =" 1" >
38
+ <string >Group</string >
39
+ </element >
40
+ </array >
41
+ </arguments >
42
+ </listener >
29
43
</listeners >
30
44
31
45
<php >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ /**
8
+ * Generate Allure report using Allure Commandline (CLI).
9
+ *
10
+ * Allure CLI is a Java application so it's available for all platforms.
11
+ * You have to manually install Java 1.7+ before using Allure CLI.
12
+ * Information on how to install Allure CLI can be found at:
13
+ * http://wiki.qatools.ru/display/AL/Allure+Commandline
14
+ */
15
+
16
+ // Explicitly define Allure CLI executable if it's not available in your PATH.
17
+ define ('ALLURE_CLI ' , 'allure ' );
18
+
19
+ $ mtfRoot = dirname (dirname (__FILE__ ));
20
+ $ mtfRoot = str_replace ('\\' , '/ ' , $ mtfRoot );
21
+ define ('MTF_BP ' , $ mtfRoot );
22
+
23
+ // Allure test results directory which needs to match what's defined in phpunit.xml.
24
+ $ allureResultsDir = MTF_BP . '/var/allure-results/ ' ;
25
+ // Allure report directory.
26
+ $ allureReportDir = MTF_BP . '/var/allure-report/ ' ;
27
+
28
+ // Generate report using Allure CLI.
29
+ exec (ALLURE_CLI . ' generate ' . $ allureResultsDir . ' -o ' . $ allureReportDir );
30
+
31
+ // Open report using Allure CLI.
32
+ exec (ALLURE_CLI . ' report open --report-dir ' . $ allureReportDir );
You can’t perform that action at this time.
0 commit comments