From ebfe2aec0ca05aa3e27c85c10f6bb6e7f8c83253 Mon Sep 17 00:00:00 2001 From: Mihai-P Date: Wed, 10 Aug 2016 08:45:16 +1000 Subject: [PATCH] Putting the proper paths for codeception code coverage (#82) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests folder was changed some time ago, however the paths have not been updated. After running the tests with coverage $ vendor/codeception/base/codecept run functional --coverage-html Codeception PHP Testing Framework v2.2.3 Powered by PHPUnit 4.8.27 by Sebastian Bergmann and contributors. Functional Tests (10) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ✔ ContactFormCest: Open contact page (0.40s) ✔ ContactFormCest: Submit empty form (0.13s) ✔ ContactFormCest: Submit form with incorrect email (0.09s) ✔ ContactFormCest: Submit form successfully (0.30s) ✔ LoginFormCest: Open login page (0.03s) ✔ LoginFormCest: Internal login by id (0.06s) ✔ LoginFormCest: Internal login by instance (0.05s) ✔ LoginFormCest: Login with empty credentials (0.07s) ✔ LoginFormCest: Login with wrong credentials (0.07s) ✔ LoginFormCest: Login successfully (0.07s) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 6.46 seconds, Memory: 34.25MB OK (10 tests, 23 assertions) Code Coverage Report: 2016-08-09 22:21:18 Summary: Classes: (0/0) Methods: (0/0) Lines: (0/0) Remote CodeCoverage reports are not printed to console HTML report generated in coverage. ----------------------------------------------------------- After putting in the proper path you get Code Coverage Report: 2016-08-09 22:26:05 Summary: Classes: 40.00% (2/5) Methods: 63.64% (14/22) Lines: 76.04% (73/96) \app\controllers::SiteController Methods: 57.14% ( 4/ 7) Lines: 89.47% ( 34/ 38) \app\models::ContactForm Methods: 100.00% ( 3/ 3) Lines: 100.00% ( 15/ 15) \app\models::LoginForm Methods: 100.00% ( 4/ 4) Lines: 100.00% ( 18/ 18) \app\models::User Methods: 42.86% ( 3/ 7) Lines: 40.00% ( 6/ 15) Remote CodeCoverage reports are not printed to console --- codeception.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/codeception.yml b/codeception.yml index 5ca5f35..ccfaeef 100644 --- a/codeception.yml +++ b/codeception.yml @@ -21,16 +21,16 @@ modules: # #remote_config: '../tests/codeception.yml' # whitelist: # include: -# - ../models/* -# - ../controllers/* -# - ../commands/* -# - ../mail/* +# - models/* +# - controllers/* +# - commands/* +# - mail/* # blacklist: # include: -# - ../assets/* -# - ../config/* -# - ../runtime/* -# - ../vendor/* -# - ../views/* -# - ../web/* -# - ../tests/* +# - assets/* +# - config/* +# - runtime/* +# - vendor/* +# - views/* +# - web/* +# - tests/*