Преглед на файлове

Putting the proper paths for codeception code coverage (#82)

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
Mihai-P преди 9 години
родител
ревизия
ebfe2aec0c
променени са 1 файла, в които са добавени 11 реда и са изтрити 11 реда
  1. 11 11
      codeception.yml

+ 11 - 11
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/*