View Issue Details

IDProjectCategoryView StatusLast Update
0001674XdebugCode Coveragepublic2019-06-13 03:30
Reporterjoerieger@quickenloans.comAssigned To 
Status newResolutionopen 
PlatformLinuxOSDebianOS Version
Product Version2.7.2 
Target VersionFixed in Version 
Summary0001674: Inconsistent Path & Branch Coverage Reported
DescriptionDepending on what, or possibly how many, files are analyzed for path & branch coverage, XDebug reports significantly different results for path & branch coverage.

I've set up a GitHub repo here with a Docker container that consistently reproduces the output.

I've tried this on the following setups:
php-fpm from Docker, 7.3.3, and PHPUnit 8 master
php-fpm from Homebrew, 7.3.6, and PHPUnit 8 master
php-fpm from Homebrew, 7.1.29, with PHPUnit 7.5.7-6
Steps To Reproduce1. Gather code coverage on PHPUnit\Framework\Assert, and analyze the results. When calling xdebug_stop_code_coverage, pass 1 to clear results.
1a. In my testing, clearing results had no bearing on the results.
2. Properly, 193 functions are found in that class.
3. Run PHPUnit::main(), passing a flag to only test one file: tests/unit/Util/JsonTest.php
4. Re-run the same coverage gathering steps. Only 2 functions are returned.
5. Re-running step 4 also returns only 2 functions.
Additional InformationCould also fall into the category of "Usage Problems (Wrong Results)", but I'll leave that up to you to reassign.
Tagsbranches, coverage, Docker, functions, path
Operating System
PHP Version7.3.2-7.3.4


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-06-12 19:38 New Issue
2019-06-12 19:38 Tag Attached: branches
2019-06-12 19:38 Tag Attached: coverage
2019-06-12 19:38 Tag Attached: Docker
2019-06-12 19:38 Tag Attached: functions
2019-06-12 19:38 Tag Attached: path