Skip to content

Commit b23a47b

Browse files
Ashish.Kumar18Ashish.Kumar18
authored andcommitted
ACQE-4318: testgroupmembership file updated
1 parent f077773 commit b23a47b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Magento/FunctionalTestingFramework/Suite/SuiteGenerator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,18 @@ private function generateSuiteFromTest($suiteName, $tests = [], $originalSuiteNa
156156
{
157157
$relativePath = TestGenerator::GENERATED_DIR . DIRECTORY_SEPARATOR . $suiteName;
158158
$fullPath = FilePathFormatter::format(TESTS_MODULE_PATH) . $relativePath . DIRECTORY_SEPARATOR;
159-
160159
DirSetupUtil::createGroupDir($fullPath);
160+
$memberShipFilePath = FilePathFormatter::format(TESTS_MODULE_PATH).'_generated/testgroupmembership.txt';
161+
static $suiteCount = 0;
161162
$exceptionCollector = new ExceptionCollector();
162163
try {
163164
$relevantTests = [];
164165
if (!empty($tests)) {
165166
$this->validateTestsReferencedInSuite($suiteName, $tests, $originalSuiteName);
166167
foreach ($tests as $testName) {
167168
try {
168-
echo $suiteCount.":".$key.":".$suiteName.':'.$testName."\n";
169+
$suiteTests = $suiteCount.":".$key.":".$suiteName.':'.$testName."\n";
170+
file_put_contents($memberShipFilePath, $suiteTests, FILE_APPEND);
169171
$relevantTests[$testName] = TestObjectHandler::getInstance()->getObject($testName);
170172
} catch (FastFailException $e) {
171173
throw $e;
@@ -179,7 +181,7 @@ private function generateSuiteFromTest($suiteName, $tests = [], $originalSuiteNa
179181
} else {
180182
$relevantTests = SuiteObjectHandler::getInstance()->getObject($suiteName)->getTests();
181183
}
182-
184+
$suiteCount++;
183185
if (empty($relevantTests)) {
184186
$exceptionCollector->reset();
185187
// There are suites that include no test on purpose for certain Magento edition.

0 commit comments

Comments
 (0)