zend framework - How to exclude directory in code coverage in phpunit -
i have directory structure of testproject of zend application like
-source files -application -library -zend -public -test files -application -phpunit.xml
and phpunit.xml configuratio is
<phpunit bootstrap="./bootstrap.php"> <testsuite name="application test suite"> <directory>./application</directory> </testsuite> <!--<testsuite name="library test suite"> <directory>./library</directory> </testsuite>--> <filter> <!-- if zend framework inside project's library, uncomment filter --> <whitelist> <directory suffix=".php">../../library/zend</directory> </whitelist> </filter> <logging> <log type="coverage-html" target="./log/htmlreport" charset="utf-8" yui="true" highlight="true" lowupperbound="50" highlowerbound="80"/> <log type="json" target="./log/jsonreport.json" charset="utf-8"/> </logging> </phpunit>
i invoking phpunit application.it works fine , code coverage generated.however want exclude library/zend code coverage.i mean code coverage should not generated library folder.i have tried exclude generated.is there misconfiguration in phpunit.xml file?
i'd should add path application folder whitelist , not library.
in many situations white equals "add", "good", "include" , black equals "remove", "bad, "exclude".
without filter phphunit report pretty everything. adding whitelist removes coverage , adds whitelist (minus exclude or blacklist).
Comments
Post a Comment