From 1433e80319b7e5defc50ac68aaa495bf3f8b6447 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 15:14:01 +0530 Subject: [PATCH 01/24] ACQE-4973 | Group test under suites --- dev/.credentials | 1 + .../Extension/TestContextExtension.php | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 dev/.credentials diff --git a/dev/.credentials b/dev/.credentials new file mode 100644 index 000000000..50c0c05bf --- /dev/null +++ b/dev/.credentials @@ -0,0 +1 @@ +magento/MAGENTO_ADMIN_PASSWORD=Admin@123456 diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index f2e475a82..f9752df02 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -10,6 +10,7 @@ use Codeception\Step; use Magento\FunctionalTestingFramework\Allure\AllureHelper; use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler; +use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler; use Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil; use Qameta\Allure\Allure; use Qameta\Allure\Model\StepResult; @@ -158,6 +159,53 @@ function (TestResult $testResult) { $this->getFormattedSteps($testResult); } ); + + $group = null; + if ($this->options['groups'] !== null) { + $group = $this->options['groups'][0]; + } + if ($group !== null) { + $groupName = $this->sanitizeGroupName($group); + $lifecycle->updateTest( + function (TestResult $testResult) use ($groupName) { + $labels = $testResult->getLabels(); + foreach ($labels as $label) { + if ($label->getName() == "parentSuite") { + $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); + break; + } + } + } + ); + } + } + + /** + * Function which santizes any group names changed by the framework for execution in order to consolidate reporting. + * + * @param string $group + * @return string + */ + private function sanitizeGroupName($group): string + { + $suiteNames = array_keys(SuiteObjectHandler::getInstance()->getAllObjects()); + $exactMatch = in_array($group, $suiteNames); + + // if this is an existing suite name we dont' need to worry about changing it + if ($exactMatch || strpos($group, "_") === false) { + return $group; + } + + // if we can't find this group in the generated suites we have to assume that the group was split for generation + $groupNameSplit = explode("_", $group); + array_pop($groupNameSplit); + array_pop($groupNameSplit); + $originalName = implode("_", $groupNameSplit); + + // confirm our original name is one of the existing suite names otherwise just return the original group name + $originalName = in_array($originalName, $suiteNames) ? $originalName : $group; + + return $originalName; } /** From 7e96e5ca7c2ab19d4f7770e1703b668af87fe0cb Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 15:15:09 +0530 Subject: [PATCH 02/24] ACQE-4973 | Group test under suites --- dev/.credentials | 1 - 1 file changed, 1 deletion(-) delete mode 100644 dev/.credentials diff --git a/dev/.credentials b/dev/.credentials deleted file mode 100644 index 50c0c05bf..000000000 --- a/dev/.credentials +++ /dev/null @@ -1 +0,0 @@ -magento/MAGENTO_ADMIN_PASSWORD=Admin@123456 From ae2fc5e042031fc20f38b5ae66bd041fd321ef5a Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:04:54 +0530 Subject: [PATCH 03/24] ACQE-4973 | Group test under packages --- .../Extension/TestContextExtension.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index f9752df02..bf8b49f2d 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -160,24 +160,24 @@ function (TestResult $testResult) { } ); - $group = null; + $groupName = null; if ($this->options['groups'] !== null) { $group = $this->options['groups'][0]; - } - if ($group !== null) { $groupName = $this->sanitizeGroupName($group); - $lifecycle->updateTest( - function (TestResult $testResult) use ($groupName) { - $labels = $testResult->getLabels(); - foreach ($labels as $label) { - if ($label->getName() == "parentSuite") { - $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); - break; - } + } + $lifecycle->updateTest( + function (TestResult $testResult) use ($groupName, $cest) { + $labels = $testResult->getLabels(); + foreach ($labels as $label) { + if ($groupName !== null && $label->getName() === "parentSuite") { + $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); + } + if ($label->getName() === "package") { + $label->setValue($cest->getReportFields()['class']); } } - ); - } + } + ); } /** From 7161244226a463eaed4655eaf347f31b584a7775 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:08:19 +0530 Subject: [PATCH 04/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index bf8b49f2d..bc7245150 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -193,7 +193,7 @@ private function sanitizeGroupName($group): string // if this is an existing suite name we dont' need to worry about changing it if ($exactMatch || strpos($group, "_") === false) { - return $group; + return $group; } // if we can't find this group in the generated suites we have to assume that the group was split for generation From a8d01f0f120c9c6f06c73bcbe069bdca6f4c23be Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:37:21 +0530 Subject: [PATCH 05/24] ACQE-4973 | Fix cyclometry complexity checks --- dev/.credentials | 1 + .../Extension/TestContextExtension.php | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 dev/.credentials diff --git a/dev/.credentials b/dev/.credentials new file mode 100644 index 000000000..50c0c05bf --- /dev/null +++ b/dev/.credentials @@ -0,0 +1 @@ +magento/MAGENTO_ADMIN_PASSWORD=Admin@123456 diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index bc7245150..9bf6060cf 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -160,6 +160,11 @@ function (TestResult $testResult) { } ); + $this->addTestsInSuites($lifecycle, $cest); + } + + private function addTestsInSuites($lifecycle, $cest): void + { $groupName = null; if ($this->options['groups'] !== null) { $group = $this->options['groups'][0]; @@ -167,16 +172,16 @@ function (TestResult $testResult) { } $lifecycle->updateTest( function (TestResult $testResult) use ($groupName, $cest) { - $labels = $testResult->getLabels(); - foreach ($labels as $label) { - if ($groupName !== null && $label->getName() === "parentSuite") { - $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); - } - if ($label->getName() === "package") { - $label->setValue($cest->getReportFields()['class']); - } + $labels = $testResult->getLabels(); + foreach ($labels as $label) { + if ($groupName !== null && $label->getName() === "parentSuite") { + $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); + } + if ($label->getName() === "package") { + $label->setValue($cest->getReportFields()['class']); } } + } ); } From 12dc6903e6bcc79d19c47ca2a59bf1be72d93dbc Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:38:05 +0530 Subject: [PATCH 06/24] ACQE-4973 | Fix cyclometry complexity checks --- dev/.credentials | 1 - 1 file changed, 1 deletion(-) delete mode 100644 dev/.credentials diff --git a/dev/.credentials b/dev/.credentials deleted file mode 100644 index 50c0c05bf..000000000 --- a/dev/.credentials +++ /dev/null @@ -1 +0,0 @@ -magento/MAGENTO_ADMIN_PASSWORD=Admin@123456 From 2bcb74c00205229d46e549112052e71b8fcebcb8 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:47:45 +0530 Subject: [PATCH 07/24] ACQE-4973 | Fix cyclometry complexity checks --- .../Extension/TestContextExtension.php | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 9bf6060cf..d981d1c08 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -163,6 +163,12 @@ function (TestResult $testResult) { $this->addTestsInSuites($lifecycle, $cest); } + /** + * Function to add test under the suites + * + * @param string $group + * @return void + */ private function addTestsInSuites($lifecycle, $cest): void { $groupName = null; @@ -172,16 +178,16 @@ private function addTestsInSuites($lifecycle, $cest): void } $lifecycle->updateTest( function (TestResult $testResult) use ($groupName, $cest) { - $labels = $testResult->getLabels(); - foreach ($labels as $label) { - if ($groupName !== null && $label->getName() === "parentSuite") { - $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); - } - if ($label->getName() === "package") { - $label->setValue($cest->getReportFields()['class']); + $labels = $testResult->getLabels(); + foreach ($labels as $label) { + if ($groupName !== null && $label->getName() === "parentSuite") { + $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); + } + if ($label->getName() === "package") { + $label->setValue($cest->getReportFields()['class']); + } } } - } ); } From 7453d3c047d8454e95bf46ab5499a6a8ebfd6d94 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 16:55:07 +0530 Subject: [PATCH 08/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index d981d1c08..604d7d3be 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -166,7 +166,8 @@ function (TestResult $testResult) { /** * Function to add test under the suites * - * @param string $group + * @param $lifecycle + * @param $cest * @return void */ private function addTestsInSuites($lifecycle, $cest): void From f057509307fce5f21b7775442b1cb40fdb4ccf88 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:03:40 +0530 Subject: [PATCH 09/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 604d7d3be..743637572 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -8,11 +8,13 @@ use Codeception\Events; use Codeception\Step; +use Codeception\Test\Test; use Magento\FunctionalTestingFramework\Allure\AllureHelper; use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler; use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler; use Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil; use Qameta\Allure\Allure; +use Qameta\Allure\AllureLifecycleInterface; use Qameta\Allure\Model\StepResult; use Magento\FunctionalTestingFramework\Test\Objects\ActionObject; use Magento\FunctionalTestingFramework\Test\Objects\ActionGroupObject; @@ -166,8 +168,8 @@ function (TestResult $testResult) { /** * Function to add test under the suites * - * @param $lifecycle - * @param $cest + * @param AllureLifecycleInterface $lifecycle + * @param Test $cest * @return void */ private function addTestsInSuites($lifecycle, $cest): void From 7b3e234d1af48bf28c428a477a54041538215553 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:08:56 +0530 Subject: [PATCH 10/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 743637572..10f91b561 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -170,9 +170,10 @@ function (TestResult $testResult) { * * @param AllureLifecycleInterface $lifecycle * @param Test $cest + * * @return void */ - private function addTestsInSuites($lifecycle, $cest): void + private function addTestsInSuites(AllureLifecycleInterface $lifecycle, Test $cest): void { $groupName = null; if ($this->options['groups'] !== null) { From 3aa90d6428920b96be19942e28b79bc02952c772 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:11:08 +0530 Subject: [PATCH 11/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 10f91b561..dfec544f5 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,9 +168,8 @@ function (TestResult $testResult) { /** * Function to add test under the suites * - * @param AllureLifecycleInterface $lifecycle + * @param AllureLifecycleInterface $lifecycle * @param Test $cest - * * @return void */ private function addTestsInSuites(AllureLifecycleInterface $lifecycle, Test $cest): void From 3359dc27deb29f2ac167b05ebf652b88e6305826 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:12:36 +0530 Subject: [PATCH 12/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index dfec544f5..1a1e379be 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,7 +168,7 @@ function (TestResult $testResult) { /** * Function to add test under the suites * - * @param AllureLifecycleInterface $lifecycle + * @param AllureLifecycleInterface $lifecycle * @param Test $cest * @return void */ From 0c16e969a3ba48eca0a27bd1be5f7c1b8cd646d4 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:13:55 +0530 Subject: [PATCH 13/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 1a1e379be..5484442cd 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -166,7 +166,7 @@ function (TestResult $testResult) { } /** - * Function to add test under the suites + * Function to add test under the suites. * * @param AllureLifecycleInterface $lifecycle * @param Test $cest From 37cbf8fdd70bfc1c737a02510a40b4896a81796f Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:15:30 +0530 Subject: [PATCH 14/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 5484442cd..f4dbc9e65 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,7 +168,7 @@ function (TestResult $testResult) { /** * Function to add test under the suites. * - * @param AllureLifecycleInterface $lifecycle + * @param object $lifecycle * @param Test $cest * @return void */ From c279facdab908f9e2be56ff8e70c0ae35802b468 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:17:05 +0530 Subject: [PATCH 15/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index f4dbc9e65..52185c040 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,11 +168,11 @@ function (TestResult $testResult) { /** * Function to add test under the suites. * - * @param object $lifecycle + * @param object $lifecycle * @param Test $cest * @return void */ - private function addTestsInSuites(AllureLifecycleInterface $lifecycle, Test $cest): void + private function addTestsInSuites($lifecycle, $cest): void { $groupName = null; if ($this->options['groups'] !== null) { From 31ec8b5700912397d91c1306807ac22a27a9369b Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:19:33 +0530 Subject: [PATCH 16/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 52185c040..81379efd8 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,8 +168,9 @@ function (TestResult $testResult) { /** * Function to add test under the suites. * - * @param object $lifecycle - * @param Test $cest + * @param string $lifecycle + * @param string $cest + * * @return void */ private function addTestsInSuites($lifecycle, $cest): void From 291990e92006c4aac2d1fdc1e03e745133687a68 Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Thu, 25 May 2023 17:22:49 +0530 Subject: [PATCH 17/24] ACQE-4973 | Fix static checks --- .../Extension/TestContextExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 81379efd8..9d4866028 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -168,8 +168,8 @@ function (TestResult $testResult) { /** * Function to add test under the suites. * - * @param string $lifecycle - * @param string $cest + * @param object $lifecycle + * @param object $cest * * @return void */ From 6fcccac8a3c493faa65235447eacbd9fc5e229d3 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 30 May 2023 19:12:53 +0100 Subject: [PATCH 18/24] Wait for cron process to finish properly --- .../FunctionalTestingFramework/Module/MagentoWebDriver.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index 54fecf7de..f2580deaf 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -1033,6 +1033,10 @@ private function executeCronjobs($cronGroups, $timeout, $arguments): string { $cronGroups = array_filter($cronGroups); + if (isset($cronGroups[0]) && !isset($cronGroups[1])) { + $arguments .= ' --bootstrap=standaloneProcessStarted=1'; + } + $waitFor = $this->getCronWait($cronGroups); if ($waitFor) { From 33f58bd62420c7d53e0b88cd6b44811b0ec28232 Mon Sep 17 00:00:00 2001 From: Manjusha Date: Thu, 1 Jun 2023 12:01:39 +0530 Subject: [PATCH 19/24] ACQE-4951 : Handled Exception Serialization of weakMap is not allowed In Allure Helper.php Line 26 --- .../FunctionalTestingFramework/Allure/AllureHelper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php index 8f7699ed0..c3a5a8cd4 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php +++ b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php @@ -23,7 +23,11 @@ class AllureHelper public static function addAttachmentToCurrentStep($data, $caption): void { if (!is_string($data)) { - $data = serialize($data); + try { + $data = serialize($data); + } catch (Exception $exception) { + throw new \Exception($data->getMessage()); + } } if (@file_exists($data) && is_file($data)) { Allure::attachmentFile($caption, $data); From 17ea56223417ebae796f59117322fa7e7993940e Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 5 Jun 2023 09:48:36 +0530 Subject: [PATCH 20/24] Update TestContextExtension.php --- .../Extension/TestContextExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 1ac155092..33c8cea0e 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -188,7 +188,9 @@ function (TestResult $testResult) use ($groupName, $cest) { $label->setValue(sprintf('%s\%s', $label->getValue(), $groupName)); } if ($label->getName() === "package") { - $label->setValue($cest->getReportFields()['class']); + $className = $cest->getReportFields()['class']; + $className = str_replace('\_default', '', $className); + $label->setValue($className); } } } From 540746cb0c8929cd4ff29e4a2a097bb5e172a5e9 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Wed, 7 Jun 2023 08:43:11 +0530 Subject: [PATCH 21/24] Update TestContextExtension.php --- .../Extension/TestContextExtension.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 33c8cea0e..a4f9461df 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -189,7 +189,6 @@ function (TestResult $testResult) use ($groupName, $cest) { } if ($label->getName() === "package") { $className = $cest->getReportFields()['class']; - $className = str_replace('\_default', '', $className); $label->setValue($className); } } From 1f8137d829fd781d8b1e9c883ba40d6e3d5d4c21 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:09:27 +0530 Subject: [PATCH 22/24] Update AllureHelper.php --- src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php index c3a5a8cd4..6e6498e62 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php +++ b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php @@ -25,7 +25,7 @@ public static function addAttachmentToCurrentStep($data, $caption): void if (!is_string($data)) { try { $data = serialize($data); - } catch (Exception $exception) { + } catch (\Exception $exception) { throw new \Exception($data->getMessage()); } } From 605055a38a8035537823a78f546a030f9a5d5fb4 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Wed, 7 Jun 2023 21:07:12 +0530 Subject: [PATCH 23/24] Update TestContextExtension.php --- .../Extension/TestContextExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index a4f9461df..5f850a403 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -189,6 +189,7 @@ function (TestResult $testResult) use ($groupName, $cest) { } if ($label->getName() === "package") { $className = $cest->getReportFields()['class']; + $className = preg_replace('{_[0-9]*_G}', '', $className); $label->setValue($className); } } From 10a03d5ab18e00a90412574ec5577fcd0294b5da Mon Sep 17 00:00:00 2001 From: Manjusha Date: Fri, 16 Jun 2023 12:29:48 +0530 Subject: [PATCH 24/24] 4.3.2-Release-Checklist : MFTF release --- CHANGELOG.md | 9 +++++++++ composer.json | 2 +- composer.lock | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86452d120..cfd9a6e86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Magento Functional Testing Framework Changelog ================================================ +4.3.2 +--------- +### Enhancements +* 'bootstrap' argument added to indicate that no additional background processes will be run and the jobs complete in the foreground process. + +### Fixes +* Fixed serialization of weakmap exception thrown for every internal exception after codeception upgrade. +* Fixed suites no longer separated by MFTF Suite. + 4.3.1 --------- ### Fixes diff --git a/composer.json b/composer.json index 26199a504..96105c4b0 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2-functional-testing-framework", "description": "Magento2 Functional Testing Framework", "type": "library", - "version": "4.3.1", + "version": "4.3.2", "license": "AGPL-3.0", "keywords": ["magento", "automation", "functional", "testing"], "config": { diff --git a/composer.lock b/composer.lock index 8131637d3..ec7e440cd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1cfdd64e0e61b92650826ed6b7378188", + "content-hash": "b3c3ad8cbe0e410841d4c61f9cd36a55", "packages": [ { "name": "allure-framework/allure-codeception",