@@ -30,6 +30,11 @@ class RunTestFailedCommand extends BaseGenerateCommand
30
30
31
31
const TESTS_FAILED_FILE = self ::TESTS_OUTPUT_DIR . "failed " ;
32
32
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 " ;
33
38
34
39
/**
35
40
* Configures the current command.
@@ -76,17 +81,23 @@ protected function execute(InputInterface $input, OutputInterface $output)
76
81
77
82
$ command ->run (new ArrayInput ($ args ), $ output );
78
83
79
- $ codeceptionCommand = realpath ( PROJECT_ROOT . ' /vendor/bin/codecept ' ) . ' run functional --verbose --steps ' ;
84
+ $ testManifestList = $ this -> readTestManifestFile () ;
80
85
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
+ }
90
101
}
91
102
92
103
/**
@@ -138,6 +149,17 @@ private function getFailedTestList()
138
149
return $ testConfigurationJson ;
139
150
}
140
151
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
+
141
163
/**
142
164
* Returns an array of tests read from the failed test file in _output
143
165
*
0 commit comments