PhpStorm 2017.1 Help

Viewing Code Coverage Results

Viewing code coverage helps you detect pieces of your source code that are not affected by simulation.


  1. The PHPUnit tool is installed on your machine and enabled in PhpStorm.
  2. A Xdebug or Zend Debugger debugging engine is configured in the current PHP interpreter.

To view code coverage results

  1. Create a testing run/debug configuration, select it in the Run/Debug Configurations drop-down list, and click the Run with Coverage button /help/img/idea/2017.1/runWithCoverage.png.
  2. Do one of the following:
    • On the main menu, choose Tools | Show Code Coverage Data.
    • Press Ctrl+Alt+F6.
  3. In the Choose Coverage Suite to Display dialog box, select check boxes next to the suites to view and click the Show selected button.
  4. View coverage results in the dedicated Coverage tool window.
  5. Create missing tests, as described in the section Testing Creating JavaScript Unit Tests. For JavaScript, tests can be generated as described in section Creating JavaScript Unit Tests.

See Also

Last modified: 19 July 2017