Codeception: ERROR No code coverage driver available

Created on 14 Jul 2014  路  9Comments  路  Source: Codeception/Codeception

When I try to run tests with coverage enabled codecept run unit --coverage --coverage-html I get the following error output:

[PHP_CodeCoverage_Exception]
No code coverage driver available 

Configuration:

actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    colors: true
    memory_limit: 1024M
modules:
    config:
        Db: ...
coverage:
    enabled: true
    include:
        - app/*
    exclude:
        - app/storage/*

Am I doing something wrong?

Most helpful comment

OK, it seems I had XDebug disabled. I'll ask for a better error message at https://github.com/sebastianbergmann/php-code-coverage.

Cheers!

All 9 comments

OK, it seems I had XDebug disabled. I'll ask for a better error message at https://github.com/sebastianbergmann/php-code-coverage.

Cheers!

I just came across this too, luckily searing for the exception message brought up this issue.

:+1:

:+1:

Same problem, but XDebug installed =/

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

@punchi first check if you have xdebug module in your machine:

php -i | grep xdebug

then check if it's enabled:

php -m | grep xdebug

If you don't have the xdebug module, you'll need to install it.

Hi @spelcaster thanks for your answer. You were right, with WAMP the xdebug was not running, installed XAMPP instead and everything it's ok =)

I have de next:
jhfaber@jhfaber:~/Downloads/xdebug-2.5.0RC1$ php -i | grep xdebug

OLDPWD => /home/jhfaber/Downloads/xdebug-2.5.0RC1/modules
PWD => /home/jhfaber/Downloads/xdebug-2.5.0RC1
$_SERVER['OLDPWD'] => /home/jhfaber/Downloads/xdebug-2.5.0RC1/modules
$_SERVER['PWD'] => /home/jhfaber/Downloads/xdebug-2.5.0RC1

But i have the next:
jhfaber@jhfaber:~/Downloads/xdebug-2.5.0RC1$ php -m | grep xdebug
jhfaber@jhfaber:~/Downloads/xdebug-2.5.0RC1$

What is happening?

@jhfaber you haven't installed xdebug. Whatever you did was incorrect or incomplete. php -i shows that you ran it in xdebug directory.

Was this page helpful?
0 / 5 - 0 ratings