Comments (4)
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.
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.
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.
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)
- Error on nikic/PhpParser/Lexer.php HOT 4
- PHP 8 Support HOT 1
- Deal with merging coverage files, generated with different base paths HOT 3
- Docker official image HOT 2
- Docs. Wich version to use. HOT 2
- Is there a way to turn a Clover XML file to HTML (or something else more readable than XML)? HOT 2
- PHP 8 support HOT 1
- Support phpunit/phpunit ^10 and phpunit/php-code-coverage ^10 HOT 3
- Set up build automation HOT 9
- Issue with latest release __PHP_Incomplete_Class HOT 3
- Session modification issues with phpcov execute HOT 1
- Support for PHPUnit 10.2 HOT 3
- HTML Coverage Reports for Patch-Coverage HOT 1
- Field width too long
- Support for `11.0.0` version of `phpunit/php-code-coverage` HOT 2
- Test Failure(s)
- Merge JUnit files HOT 1
- I get an error message:zend_mm_heap corrupted HOT 1
- Merge not working since upgrading Symfony to 5.4
- Missing fix in version 8.2.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpcov.