6

I'm using Xdebug to get some coverage data during my unit tests, but it costs a lot of time (and memory).

Is there any way to get coverage without using Xdebug?

1
  • 2
    but it costs a lot of time hopeflully you have a DEV-stage (or server) and not running test on PROD-stage (or server) ;-) Also you can group tests, to not always run all tests at once. Commented Apr 12, 2017 at 9:46

1 Answer 1

14

As of PHP 7, you can use PHPDBG instead of Xdebug to collect code coverage information with PHPUnit. However, there will always be a resource penalty (time and memory) when code coverage information is collected.

Sign up to request clarification or add additional context in comments.

1 Comment

Since 2023: PHPDBG is no longer supported by php-code-coverage, you need PCOV or Xdebug 3 now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.