diff --git a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php index 64d9fdc36..65be8ea84 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php +++ b/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php @@ -104,10 +104,13 @@ private function sanitizeGroupName($group) } /** - * Override of parent method, only different to prevent replacing of . to • + * Override of parent method: + * prevent replacing of . to • + * strips control characters * * @param StepEvent $stepEvent * @return void + * @throws \Yandex\Allure\Adapter\AllureException */ public function stepBefore(StepEvent $stepEvent) { @@ -129,6 +132,9 @@ public function stepBefore(StepEvent $stepEvent) $stepName = $stepAction . ' ' . $stepArgs; + // Strip control characters so that report generation does not fail + $stepName = preg_replace('/[[:cntrl:]]/', '', $stepName); + $this->emptyStep = false; $this->getLifecycle()->fire(new StepStartedEvent($stepName)); }