Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add branch coverage statistics to XML report output #1056

Open
chiefmyron opened this issue Dec 13, 2024 · 1 comment
Open

Add branch coverage statistics to XML report output #1056

chiefmyron opened this issue Dec 13, 2024 · 1 comment

Comments

@chiefmyron
Copy link

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.

@chiefmyron
Copy link
Author

I have created an initial PR with this functionality (#1057).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants