Full-stack testing PHP framework
SamMousa and DavertMik Yii2: Move implementations to connector (#5173)
* Refactor functions from module to connector, keeping the module interface the same but moving implementations to the connector.

* Fixed nitpick CS

* Attempt to use Guzzle MockHandler instead of external service

* Fixed issues with test & phpbrowser configurability
Latest commit 005abfa Sep 18, 2018
Failed to load latest commit information.
docs make coverage 'show_only_summary' configurable (#5142) Sep 11, 2018
ext Added getLogger (#5152) Sep 11, 2018
package Added init command to phar file (#4627) Nov 15, 2017
src/Codeception Yii2: Move implementations to connector (#5173) Sep 18, 2018
tests Yii2: Move implementations to connector (#5173) Sep 18, 2018
.gitattributes added .gitattributes Jan 24, 2015
.gitignore PHPUnit 7 support (#4799) Feb 17, 2018
.travis.yml Fixed an issue with exit exceptions (#4923) Apr 5, 2018
CHANGELOG-2.0.md [WIP] Clean up (#4720) Jan 7, 2018
CHANGELOG-2.1.md [WIP] Clean up (#4720) Jan 7, 2018
CHANGELOG-2.2.md [WIP] Clean up (#4720) Jan 7, 2018
CHANGELOG-2.3.md Pre 2.3.9 (#4832) Feb 26, 2018
CHANGELOG-2.4.md version bump and changelog Aug 1, 2018
CONTRIBUTING.md Updated CONTRIBUTING.md (#3751) Nov 17, 2016
Dockerfile added PHP 7.2 support, xdebug added as 2.6.0beta1 (#4749) Jan 13, 2018
ISSUE_TEMPLATE.md [WIP] Clean up (#4720) Jan 7, 2018
LICENSE Fixes #2207: added license file Jul 23, 2015
PruneTest.php This adds support for components that keep state that must be cleared… ( Apr 6, 2018
RoboFile.php [Docs] updated PHP requirements for 2..4 version (#5098) Jul 29, 2018
appveyor.yml Fixing windows builds (#4849) Mar 7, 2018
autoload.php [Autoload] Removed json_last_error_msg declaration (#5144) Sep 11, 2018
codecept Allow Symfony 4 components (#4580) Nov 23, 2017
codecept.bat fix to #8 Feb 28, 2012
codeception.yml Specify failed group name to save tests for Run Failed Ext (#4471) Sep 11, 2017
composer.json Fixed psr4 autoload path. (#5145) Sep 11, 2018
nitpick.json Support for PHPUnit 6 Apr 25, 2017
readme.md updated readme Aug 1, 2018
ruleset.xml PSR-2 compliance (#3105) May 16, 2016
shim.php Update shim.php (#5013) Jun 20, 2018
wercker.yml changed Wercker builds to run only RunCest tests (#4390) Jul 10, 2017



Latest Stable Total Downloads Scrutinizer Code Quality

Modern PHP Testing for everyone

Codeception is a modern full-stack testing framework for PHP. Inspired by BDD, it provides an absolutely new way of writing acceptance, functional and even unit tests. Powered by PHPUnit.

General Windows Webdriver HHVM
Build Status Build status Build Status wercker status


At Codeception we are glad to receive contributions from the community. If you want to send additions or fixes to the code or the documentation please check the Contributing guide.

At a Glance

Describe what you test and how you test it. Use PHP to write descriptions faster.

Run tests and see what actions were taken and what results were seen.

Sample test

$I->wantTo('create wiki page');
$I->see('New Page');
$I->submitForm('form#new_page', ['title' => 'Movie Review']);
$I->see('page created'); // notice generated
$I->see('Movie Review','h1'); // head of page of is our title
$I->seeInCurrentUrl('pages/movie-review'); // slug is generated
$I->seeInDatabase('pages', ['title' => 'Movie Review']); // data is stored in database

For unit testing you can stay on classic PHPUnit tests, as Codeception can run them too.



php composer.phar require "codeception/codeception"


Download codecept.phar

Copy it into your project.

You can also make Codeception an executable and it put it into your $PATH, for instance:

wget http://codeception.com/codecept.phar

chmod +x codecept.phar

sudo mv codecept.phar /usr/local/bin/codecept

You can then run Codecept in the command line using: codecept bootstrap, codecept run, etc

Run CLI utility:

php codecept.phar

See also Installation | QuickStart

Getting Started

After you successfully installed Codeception, run this command:

codecept bootstrap

This will create a default directory structure and default test suites.



Documentation is included within the project. Look for it in the 'docs' directory.



(c) Codeception Team 2011-2018