Skip to content

Commit d2010f0

Browse files
committed
MQE-1331: MFTF Run:Test Will Run All Tests That Are Already Generated
restructured command formation
1 parent dd35d9d commit d2010f0

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9090
}
9191

9292
$returnCode = 0;
93+
$codeceptionCommand = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional ';
94+
$testsDirectory = TESTS_MODULE_PATH . DIRECTORY_SEPARATOR . TestGenerator::GENERATED_DIR . DIRECTORY_SEPARATOR;
9395
//execute only tests specified as arguments in run command
9496
foreach ($tests as $test) {
95-
$codeceptionCommand = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional ';
96-
$test = TESTS_MODULE_PATH .
97-
DIRECTORY_SEPARATOR .
98-
TestGenerator::GENERATED_DIR .
99-
DIRECTORY_SEPARATOR .
100-
TestGenerator::DEFAULT_DIR .
101-
DIRECTORY_SEPARATOR .
102-
$test .
103-
'Cest.php';
104-
$codeceptionCommand .= $test;
105-
$codeceptionCommand .= ' --verbose --steps';
106-
107-
$process = new Process($codeceptionCommand);
97+
$testGroup = TestGenerator::DEFAULT_DIR . DIRECTORY_SEPARATOR;
98+
$testName = $test . 'Cest.php';
99+
$fullCommand = $codeceptionCommand . $testsDirectory . $testGroup . $testName . ' --verbose --steps';
100+
$process = new Process($fullCommand);
108101
$process->setWorkingDirectory(TESTS_BP);
109102
$process->setIdleTimeout(600);
110103
$process->setTimeout(0);

0 commit comments

Comments
 (0)