@@ -60,6 +60,10 @@ namespace {
6060            complex_structs_test_h,         inner_basic_functions_test_h
6161        };
6262
63+         std::vector<fs::path> allProjectSrcFiles = {
64+             " assertion_failures.c" " basic_functions.c" " complex_structs.c" " inner/inner_basic_functions.c" 
65+         };
66+ 
6367        void  SetUp () override  {
6468            clearTestDirectory ();
6569            clearDirectory (suitePath / resultsDirectoryName);
@@ -91,7 +95,7 @@ namespace {
9195            }
9296        }
9397
94-         void  checkCoverageDirectory () {
98+         void  checkResultsDirectory () {
9599            FileSystemUtils::RecursiveDirectoryIterator directoryIterator (suitePath /
96100                                                                          resultsDirectoryName);
97101            EXPECT_EQ (directoryIterator.size (), 3 );
@@ -184,49 +188,60 @@ namespace {
184188    }
185189
186190    TEST_F (CLI_Test, Run_All_Tests) {
187-         runCommandLine ({ " ./utbot" " generate" " --project-path" " --build-dir" 
188-                          buildDirectoryName, " project" 
191+         clearTestDirectory ();
192+         runCommandLine ({ " ./utbot" " generate" " --project-path" 
193+                          " --results-dir" 
194+                          " --build-dir" " project" 
189195        checkTestDirectory (allProjectTestFiles);
196+         testUtils::checkGenerationStatsCSV (suitePath / resultsDirectoryName / " generation-stats.csv" 
190197        runCommandLine ({ " ./utbot" " run" " --project-path" " --results-dir" 
191198                         resultsDirectoryName, " --build-dir" " project" 
192-         checkCoverageDirectory ();
199+         checkResultsDirectory ();
200+         testUtils::checkExecutionStatsCSV (suitePath / resultsDirectoryName / " execution-stats.csv" 
193201    }
194202
195203    TEST_F (CLI_Test, Run_File_Tests) {
196-         runCommandLine ({ " ./utbot" " generate" " --project-path" " --build-dir" 
197-                          buildDirectoryName, " file" " --file-path" 
198-                          suitePath / " basic_functions.c" 
204+         runCommandLine ({ " ./utbot" " generate" " --project-path" 
205+                          " --results-dir" 
206+                          " --build-dir" " file" 
207+                          " --file-path" " basic_functions.c" 
199208        checkTestDirectory ({ basic_functions_tests_cpp, basic_functions_tests_h });
209+         testUtils::checkGenerationStatsCSV (suitePath / resultsDirectoryName / " generation-stats.csv" 
210+                                            {" basic_functions.c" 
200211        runCommandLine ({ " ./utbot" " run" " --project-path" " --results-dir" 
201212                         resultsDirectoryName, " --build-dir" " file" 
202213                         " --file-path" getTestDirectory () / basic_functions_tests_cpp });
203-         checkCoverageDirectory ();
214+         testUtils::checkExecutionStatsCSV (suitePath / resultsDirectoryName / " execution-stats.csv" 
215+                                           {" basic_functions.c" 
216+         checkResultsDirectory ();
204217    }
205218
206219    TEST_F (CLI_Test, Run_Specific_Test) {
207-         runCommandLine ({ " ./utbot" " generate" " --project-path" " --build-dir" 
208-                          buildDirectoryName, " file" " --file-path" 
209-                          suitePath / " basic_functions.c" 
220+         runCommandLine ({ " ./utbot" " generate" " --project-path" 
221+                          " --results-dir" 
222+                          " --build-dir" " file" 
223+                          " --file-path" " basic_functions.c" 
210224        checkTestDirectory ({ basic_functions_tests_cpp, basic_functions_tests_h });
211225        runCommandLine ({ " ./utbot" " run" " --project-path" " --results-dir" 
212226                         resultsDirectoryName, " --build-dir" " test" 
213227                         " --file-path" getTestDirectory () / basic_functions_tests_cpp,
214228                         " --test-suite" " regression" " --test-name" "  max__test_1" 
215-         checkCoverageDirectory ();
229+         checkResultsDirectory ();
216230    }
217231
218232    TEST_F (CLI_Test, All_Command_Tests) {
219233        runCommandLine ({ " ./utbot" " all" " --project-path" " --build-dir" 
220234                         buildDirectoryName, " --results-dir" 
221235        checkTestDirectory (allProjectTestFiles);
222-         checkCoverageDirectory ();
236+         checkResultsDirectory ();
237+         testUtils::checkGenerationStatsCSV (suitePath / resultsDirectoryName / " generation-stats.csv" 
238+         testUtils::checkExecutionStatsCSV (suitePath / resultsDirectoryName / " execution-stats.csv" 
223239    }
224240
225241    TEST_F (CLI_Test, Target_Option_Tests) {
226242        runCommandLine ({ " ./utbot" " generate" " --project-path" " --build-dir" 
227243                         buildDirectoryName, " file" " --file-path" 
228244                         suitePath / " basic_functions.c" " --target" " cli" 
229245        checkTestDirectory ({ basic_functions_tests_cpp, basic_functions_tests_h });
230- 
231246    }
232247}
0 commit comments