@@ -30,6 +30,11 @@ class RunTestFailedCommand extends BaseGenerateCommand
3030
3131 const TESTS_FAILED_FILE = self ::TESTS_OUTPUT_DIR . "failed " ;
3232 const TESTS_RERUN_FILE = self ::TESTS_OUTPUT_DIR . "rerun_tests " ;
33+ const TESTS_MANIFEST_FILE = TESTS_MODULE_PATH .
34+ DIRECTORY_SEPARATOR .
35+ "_generated " .
36+ DIRECTORY_SEPARATOR .
37+ "testManifest.txt " ;
3338
3439 /**
3540 * Configures the current command.
@@ -76,17 +81,23 @@ protected function execute(InputInterface $input, OutputInterface $output)
7681
7782 $ command ->run (new ArrayInput ($ args ), $ output );
7883
79- $ codeceptionCommand = realpath ( PROJECT_ROOT . ' /vendor/bin/codecept ' ) . ' run functional --verbose --steps ' ;
84+ $ testManifestList = $ this -> readTestManifestFile () ;
8085
81- $ process = new Process ($ codeceptionCommand );
82- $ process ->setWorkingDirectory (TESTS_BP );
83- $ process ->setIdleTimeout (600 );
84- $ process ->setTimeout (0 );
85- $ process ->run (
86- function ($ type , $ buffer ) use ($ output ) {
87- $ output ->write ($ buffer );
88- }
89- );
86+ foreach ($ testManifestList as $ testCommand )
87+ {
88+ $ codeceptionCommand = realpath (PROJECT_ROOT . '/vendor/bin/codecept ' ) . ' run functional ' ;
89+ $ codeceptionCommand .= $ testCommand ;
90+
91+ $ process = new Process ($ codeceptionCommand );
92+ $ process ->setWorkingDirectory (TESTS_BP );
93+ $ process ->setIdleTimeout (600 );
94+ $ process ->setTimeout (0 );
95+ $ process ->run (
96+ function ($ type , $ buffer ) use ($ output ) {
97+ $ output ->write ($ buffer );
98+ }
99+ );
100+ }
90101 }
91102
92103 /**
@@ -138,6 +149,17 @@ private function getFailedTestList()
138149 return $ testConfigurationJson ;
139150 }
140151
152+ /**
153+ * Returns an array of tests read from the failed test file in _output
154+ *
155+ * @param string $filePath
156+ * @return array|boolean
157+ */
158+ private function readTestManifestFile ()
159+ {
160+ return file (self ::TESTS_MANIFEST_FILE , FILE_IGNORE_NEW_LINES );
161+ }
162+
141163 /**
142164 * Returns an array of tests read from the failed test file in _output
143165 *
0 commit comments