diff --git a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php new file mode 100644 index 000000000..c10a04506 --- /dev/null +++ b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php @@ -0,0 +1,67 @@ +options['groups'] != null) { + return $this->options['groups'][0]; + } + return null; + } + + /** + * Override of parent method to set suitename as suitename and group name concatenated + * + * @param SuiteEvent $suiteEvent + * @return void + */ + public function suiteBefore(SuiteEvent $suiteEvent) + { + $changeSuiteEvent = $suiteEvent; + + if ($this->getGroup() != null) { + $suite = $suiteEvent->getSuite(); + $suiteName = ($suite->getName()) . "\\" . $this->getGroup(); + + call_user_func(\Closure::bind( + function () use ($suite, $suiteName) { + $suite->name = $suiteName; + }, + null, + $suite + )); + + //change suiteEvent + $changeSuiteEvent = new SuiteEvent( + $suiteEvent->getSuite(), + $suiteEvent->getResult(), + $suiteEvent->getSettings() + ); + } + // call parent function + parent::suiteBefore($changeSuiteEvent); + } +}