Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
generateAllureReport.php
Go to the documentation of this file.
1 <?php
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);
exec($command, array &$output=null, &$return_var=null)
const ALLURE_CLI
defined('MTF_BOOT_FILE')||define('MTF_BOOT_FILE' __FILE__
Definition: bootstrap.php:7
const MTF_BP