sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
223 stars 58 forks source link

merging coverage files generated with codeception #87

Closed jcheron closed 5 years ago

jcheron commented 5 years ago

Problem:

I use codeception for acceptance (with Selenium) and local unit tests. I want to merge remote coverage with local. The 2 generated reports make references to the same files (identical paths and namespaces), however, codeception does not merge them.

So I'm trying to use phpcov...

I use the --coverage option to produce serialized format files

codecept run --coverage

The 2 generated files are:

configuration

ahocquard commented 5 years ago

Hello,

I didn't use codeception at all, so maybe my comment is not relevant. Did you configure a whitelist somewhere?

If there is nothing configured as whitelist, everything will be filtered. For example, with phpunit, you have to configure a whitelist this way in phpunit.xml:

    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">your_directory/</directory>
        </whitelist>
    </filter>

https://phpunit.readthedocs.io/en/7.4/code-coverage-analysis.html#whitelisting-files

jcheron commented 5 years ago

There is also a whitelist with codeception: in codeception.yml file:

coverage:
    include:
        - directoryToInclude/

but the problem was elsewhere. I found the solution, see https://github.com/Codeception/Codeception/issues/5368#issuecomment-460998252

Thank you for your answer