Git Product home page Git Product logo

Comments (4)

ahocquard avatar ahocquard commented on July 26, 2024

Hello,

Did you configured the phpunit.xml with a whitelist?
I had the same problem, and after investigation, the files .cov had no data due to this missing configuration.

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

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

from phpcov.

zeroble-23 avatar zeroble-23 commented on July 26, 2024

Hey thanks for the input.
Do you mean the .cov files used for merging? Because they do have content, (I attached them in my comment as phpcov1.txt because phpcov1.cov couldn't be uploaded).

I also tried adding a phpunit.xml with the filter and whitelist nodes to my root folder, but I still get the same empty output.

<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1549421579">
  <project timestamp="1549421579">
    <metrics files="0" loc="0" ncloc="0" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
  </project>
</coverage>

from phpcov.

sebastianbergmann avatar sebastianbergmann commented on July 26, 2024

Thank you for your report.

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.

from phpcov.

zeroble-23 avatar zeroble-23 commented on July 26, 2024

Thank you. Actually, while trying to re-create the problem I noticed that the path values set in $filter->setWhitelistedFiles() inside the .serialized file were not matching to the actual test files. This was due to manually moving the files from another location.

$filter->setWhitelistedFiles(array (
  '/app/tool/files_to_merge/exampleTest.php' => true,
));

By keeping the files inside their directory (the one whitelisted in the phpunit.xml file) and running the command from there I could finally generate a correctly merged file.

Everything works as it should. Sorry for the trouble.

from phpcov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.