codeception / codeception
BDD-style testing framework
Fund package maintenance!
Open Collective
Installs: 66 462 856
Dependents: 3 512
Suggesters: 25
Security: 1
Stars: 4 764
Watchers: 145
Forks: 1 301
Open Issues: 146
Requires
- php: ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- behat/gherkin: ^4.6.2
- codeception/lib-asserts: ^2.0
- codeception/stub: ^4.1
- phpunit/php-code-coverage: ^9.2 || ^10.0 || ^11.0
- phpunit/php-text-template: ^2.0 || ^3.0 || ^4.0
- phpunit/php-timer: ^5.0.3 || ^6.0 || ^7.0
- phpunit/phpunit: ^9.5.20 || ^10.0 || ^11.0
- psy/psysh: ^0.11.2 || ^0.12
- sebastian/comparator: ^4.0.5 || ^5.0 || ^6.0
- sebastian/diff: ^4.0.3 || ^5.0 || ^6.0
- symfony/console: >=4.4.24 <8.0
- symfony/css-selector: >=4.4.24 <8.0
- symfony/event-dispatcher: >=4.4.24 <8.0
- symfony/finder: >=4.4.24 <8.0
- symfony/var-dumper: >=4.4.24 <8.0
- symfony/yaml: >=4.4.24 <8.0
Requires (Dev)
- ext-simplexml: *
- codeception/lib-innerbrowser: *@dev
- codeception/lib-web: ^1.0
- codeception/module-asserts: *@dev
- codeception/module-cli: *@dev
- codeception/module-db: *@dev
- codeception/module-filesystem: *@dev
- codeception/module-phpbrowser: *@dev
- codeception/util-universalframework: *@dev
- jetbrains/phpstorm-attributes: ^1.0
- symfony/dotenv: >=4.4.24 <8.0
- symfony/process: >=4.4.24 <8.0
- vlucas/phpdotenv: ^5.1
Suggests
- ext-simplexml: For loading params from XML files
- codeception/specify: BDD-style code blocks
- codeception/verify: BDD-style assertions
- stecman/symfony-console-completion: For BASH autocompletion
- symfony/dotenv: For loading params from .env files
- symfony/phpunit-bridge: For phpunit-bridge support
- vlucas/phpdotenv: For loading params from .env files
Conflicts
Replaces
- dev-main / 5.2.x-dev
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.13
- 5.0.12
- 5.0.11
- 5.0.10
- 5.0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1.2
- 2.1.1
- 2.1.0
- 2.1.0-rc1
- 2.1.0-beta
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10.1
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-RC2
- 2.0.0-RC
- 2.0.0-beta
- 2.0.0-alpha
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0.1
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0.2
- 1.7.0.1
- 1.7.0
- 1.6.12
- 1.6.11
- 1.6.8.1
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4.2
- 1.6.4.1
- 1.6.4
- 1.6.3.1
- 1.6.3
- 1.6.2
- 1.6.1.1
- 1.6.1
- 1.6.0.4
- 1.6.0.3
- 1.6.0.1
- 1.6.0
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.0
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- dev-test-cucumber-compatibility-layer
- dev-multiapp-imprements
- dev-collision
This package is auto-updated.
Last update: 2024-10-13 11:54:14 UTC
README
Codeception
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.
Contributions
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->amOnPage('/'); $I->click('Pages'); $I->click('New'); $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.
Installation
Composer
php composer.phar require "codeception/codeception"
TODO: Document how to install the modules, e.g.
php composer.phar require "codeception/module-phpbrowser"
Phar
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 https://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
The documentation source files can be found at https://github.com/Codeception/codeception.github.com/tree/master/docs/.