Search code examples
phpunitphpstorm

How to use code coverage in PHPStorm


I've just moved from netbeans to PHPStorm and am trying to come up with a solution for Code Coverage. I have a personal license only (paid), version 6.0.3.

I would like to know:

  • Is it available in this version? (The documentation says it is available only in the Ultimate edition of IntelliJ IDEA
  • How do I configure it?
  • Can I still have it generate a code coverage report in html (the way that it does when you run PHPUnit from the command line?)

EDIT: Have answered the third point myself. (Yes, you can still get the code coverage to generate in html. The tests have to get through with no fatal errors though).

EDIT #2: OK, so I've answered the first point too - a code coverage option is now available on the bottom right of my screen, after I have run the tests, so that pretty much answers all my queries!

I think I could get to like this PHPStorm...


Solution

  • There's a documentation on jetbrains web site

    https://www.jetbrains.com/help/phpstorm/2016.3/monitoring-code-coverage-for-php-applications.html