Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHPUnit CoverageNew to Visual Studio Code? Get it now.
PHPUnit Coverage

PHPUnit Coverage

Mohamed Ali BEN SLAMA

| (0) | Free
Visualize PHPUnit code coverage in VS Code using Clover XML reports.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHPUnit Coverage for VS Code

Visualize your PHPUnit code coverage directly in your editor. This extension parses clover.xml reports to highlight covered and uncovered lines, providing instant feedback on your test results.

Features

  • Live Visualization: Covered lines are highlighted in green, while uncovered lines are highlighted in red.
  • Automatic Refresh: Automatically updates the coverage highlights when the clover.xml report file changes.
  • Support for Clover XML: Compatible with the standard Clover XML report format generated by PHPUnit.
  • Manual Control: Refresh coverage data at any time with a simple command.

How to use

  1. Generate a Clover XML coverage report with PHPUnit:
    phpunit --coverage-clover clover.xml
    
  2. Open a PHP file in VS Code.
  3. The extension will automatically look for a clover.xml file in your workspace and apply the decorations.
  4. If you need to manually refresh, use the command PHPUnit: Show Coverage from the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).

Extension Settings

This extension currently does not contribute any settings.

Known Issues

  • The extension expects the clover.xml file to be present in the workspace.
  • Path mapping between the report and the workspace might need adjustment if running tests in Docker/VMs.

Release Notes

0.0.1

  • Initial release with basic Clover XML parsing and line highlighting.
  • File system watcher for clover.xml updates.

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft