Features Releases

New in 4.0: Code Coverage for PHPUnit

We continue developing integration with tools essential for each developer who cares about the quality of his code. This time we want to introduce you Code Coverage for PHPUnit. What is Code Coverage for PHPUnit? It shows you how much of your code is covered with tests and marks covered and uncovered lines visually right in the editor.

Code coverage metrics in 'Project View'

Covered and uncovered line marks in the editor

Let’s try to get your first code coverage measurement in PhpStorm!

  1. Enable Xdebug or Zend Debugger extension in your PHP interpreter configuration (see Xdebug installation guide and Zend Debugger installation guide).
  2. Choose an existing ‘PHPUnit’ run configuration or create a new one.
  3. Launch the run configuration using the new ‘Coverage’ button.

‘Coverage’ button in ‘Run’ menu

That is all!

Download PhpStorm & WebStorm 4.0 EAP and don’t forget to provide feedback in the issue tracker ;)

Develop with pleasure!

image description