diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b01f8aa..df22459ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Magento Functional Testing Framework Changelog ================================================ +2.3.9 +----- +### Fixes +* Logic for parallel execution were updated to split default tests and suites from running in one group. 2.3.8 ----- diff --git a/composer.json b/composer.json index c59fd3279..b0935716c 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": "2.3.8", + "version": "2.3.9", "license": "AGPL-3.0", "keywords": ["magento", "automation", "functional", "testing"], "config": { diff --git a/composer.lock b/composer.lock index ae923f943..69ec89337 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": "d733d1bb277b1397e891340fed0877a2", + "content-hash": "852839b6476b1617ca7e2ed5ae46c12d", "packages": [ { "name": "allure-framework/allure-codeception", diff --git a/dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php b/dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php index c4a04d361..997bf0c3e 100644 --- a/dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php +++ b/dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php @@ -98,13 +98,14 @@ public function testSortWithSuites() $actualResult = $testSorter->getTestsGroupedBySize($sampleSuiteArray, $sampleTestArray, 500); // verify the resulting groups - $this->assertCount(4, $actualResult); + $this->assertCount(5, $actualResult); $expectedResults = [ - 1 => ['test3'], - 2 => ['test2','test5', 'test4'], - 3 => ['mockSuite1_0', 'test1'], - 4 => ['mockSuite1_1'] + 1 => ['mockSuite1_0'], + 2 => ['mockSuite1_1'], + 3 => ['test3'], + 4 => ['test2','test5', 'test4'], + 5 => ['test1'], ]; foreach ($actualResult as $groupNum => $group) { diff --git a/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php b/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php index 8654d64a7..8f4cac8a2 100644 --- a/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php +++ b/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php @@ -47,12 +47,18 @@ public function getTestsGroupedBySize($suiteConfiguration, $testNameToSize, $tim $testGroups = []; $splitSuiteNamesToTests = $this->createGroupsWithinSuites($suiteConfiguration, $time); $splitSuiteNamesToSize = $this->getSuiteToSize($splitSuiteNamesToTests); - $entriesForGeneration = array_merge($testNameToSize, $splitSuiteNamesToSize); - arsort($entriesForGeneration); + arsort($testNameToSize); + arsort($splitSuiteNamesToSize); - $testNameToSizeForUse = $entriesForGeneration; + $testNameToSizeForUse = $testNameToSize; $nodeNumber = 1; - foreach ($entriesForGeneration as $testName => $testSize) { + + foreach ($splitSuiteNamesToSize as $testName => $testSize) { + $testGroups[$nodeNumber] = [$testName => $testSize]; + $nodeNumber++; + } + + foreach ($testNameToSize as $testName => $testSize) { if (!array_key_exists($testName, $testNameToSizeForUse)) { // skip tests which have already been added to a group continue;