Skip to content

Add branch coverage statistics to XML report output #1056

Open
@chiefmyron

Description

@chiefmyron
Q A
php-code-coverage version 10.1.16
PHP version 8.3.2
Driver Xdebug
Xdebug version 3.3.1
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 10.5.37

I'm the maintainer of a VS Code extension that integrates PHPUnit with the VS Code Test Explorer, and I'd like to update it to support the new feature that allows individual tests to be associated with test coverage lines.

Currently, I'm using the Clover XML report to pick up code coverage statistics, which has been working well. However, it doesn't include the detail of which specific test covered each line. From what I can tell, the Clover XSD schema will not support adding this type of detail.

The PHPUnit XML report does include associations of tests to individual line coverage. However, the XML report does not seem to use branch coverage statistics, even when they are available.

Is there any plan to enhance the XML report to include branch coverage statistics? I am happy to put together a PR if that helps.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions