2017 © Pedro Peláez
 

composer-plugin c3

CodeCoverage collector for Codeception

image

codeception/c3

CodeCoverage collector for Codeception

  • Sunday, May 27, 2018
  • by davert
  • Repository
  • 15 Watchers
  • 45 Stars
  • 626,615 Installations
  • PHP
  • 36 Dependents
  • 0 Suggesters
  • 44 Forks
  • 4 Open issues
  • 20 Versions
  • 9 % Grown

The README.md

Issues | Usage Guide, (*1)

Remote CodeCoverage for Codeception Build Status

This file c3.php should be included into the application you are testing in the very first line. It will start remote code coverage collection. Coverage data will be stored to disk and retrieved by codeception when tests from the suite are finished. This file won't affect your application in any way. It is executed only when a special header X-Codeception-CodeCoverage is sent. Alternatively, if you use Selenium, special cookie CODECEPTION_CODECOVERAGE is used. In any other case your application run as usually with no overheads., (*2)

Local Code Coverage

If you don't run tests on remote server but use a webserver (Apache, Nginx, PhpWebserver) you need c3.php installed just the same way. In this case coverage result will be merged with local code coverage., (*3)

Installation

File c3.php should be put in project root, into the same directory where codeception.yml config is located. Also, make sure Codeception is available on remote server either in phar/pear/composer packages., (*4)

Via Composer

Add to composer.json:, (*5)

"require-dev": {
    "codeception/codeception": "3.*",
    "codeception/c3": "2.*"
}

C3 installer will copy c3.php to the project root., (*6)

Manually

wget https://raw.github.com/Codeception/c3/2.0/c3.php

Setup

Now you should include c3.php in your front script, like index.php., (*7)

Example file: web/index.php:, (*8)

``` php , (*9)


Now on when is Codeception launched with code coverage enabled you will receive a coverage report from this remote server. ### Configuration To enable remote (and local) codecoverage by c3.script you should edit global configuration file `codeception.yml`, or one of the suite configuration files. Example: codeception.yml ``` yml coverage: enabled: true remote: true include: - app/* exclude: - app/cache/*

The remote option specifies if you run your application actually runs on another server. If your webserver runs on the same node and uses the same codebase, disable this option., (*10)

Predefined Routes

c3 file shouldn't break your application, but there are predefined routes that will be managed by c3. Codeception will access routes in order to receive collected coverage report in different formats., (*11)

  • c3/report/clover
  • c3/report/serialized
  • c3/report/html
  • c3/report/clear

Debug

In case you got into troubles and remote debugging still doesn't start you can try the following. Edit c3.php file and remove the header check, (*12)

``` php // to remove if (!array_key_exists('HTTP_X_CODECEPTION_CODECOVERAGE', $_SERVER)) { return; }, (*13)

then add this line to the top of file:

``` php
$_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG'] = 1;

now access http://yourhost/c3/report/clear url and see if it has errors. Please check that error_reporting is set to E_ALL, (*14)

Temp directories

In root of your project c3tmp dir will be created during code coverage. It will not be deleted after suite ends for testing and debugging purposes. Serialized data as well as xml and html code coverage reports will be stored there., (*15)

The Versions

27/05 2018

2.0.x-dev

2.0.9999999.9999999-dev http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

27/05 2018

2.4.1

2.4.1.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

19/02 2018

2.4.0

2.4.0.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

19/02 2018

2.1

2.1.0.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

30/10 2017

2.0.14

2.0.14.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

19/10 2017

2.0.13

2.0.13.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

06/04 2017

2.0.12

2.0.12.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

04/04 2017

2.0.11

2.0.11.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

04/02 2017

2.0.10

2.0.10.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

21/01 2017

2.0.9

2.0.9.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

17/09 2016

2.0.8

2.0.8.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

27/06 2016

2.0.7

2.0.7.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

10/02 2016

2.0.6

2.0.6.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

by Tiger Seo

code coverage codecoverage

28/11 2015

2.0.5

2.0.5.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api 1.0.0

 

by Tiger Seo

code coverage codecoverage

25/11 2015

2.0.4

2.0.4.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • composer-plugin-api 1.0.0

 

by Tiger Seo

code coverage codecoverage

18/11 2014

2.0.3

2.0.3.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

code coverage codecoverage

08/10 2014

2.0.2

2.0.2.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

code coverage codecoverage

03/10 2014

2.0.1

2.0.1.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

code coverage codecoverage

03/10 2014

2.0.0

2.0.0.0 http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

code coverage codecoverage

03/10 2014

dev-master

9999999-dev http://codeception.com/

CodeCoverage collector for Codeception

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

code coverage codecoverage