• Stars
    star
    4,742
  • Rank 8,461 (Top 0.2 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 12 years ago
  • Updated 11 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Full-stack testing PHP framework

Stand With Ukraine

Codeception

Latest Stable Total Downloads StandWithUkraine Build status

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

View Documentation

The documentation source files can be found at https://github.com/Codeception/codeception.github.com/tree/master/docs/.

License

MIT

More Repositories

1

AspectMock

The most powerful and flexible mocking framework for PHPUnit / Codeception.
PHP
787
star
2

Stub

Flexible Stub wrapper for PHPUnit's Mock Builder
PHP
292
star
3

phpunit-wrapper

PHPUnit bridge for Codeception
PHP
239
star
4

Specify

BDD style code blocks for PHPUnit / Codeception
PHP
156
star
5

Verify

BDD Assertions for PHPUnit and Codeception
PHP
142
star
6

sample-l4-app

Codeception Laravel Tests
PHP
104
star
7

lib-asserts

Assertion methods used by Codeception core and Asserts module
PHP
93
star
8

module-symfony

Codeception module for testing apps using Symfony framework
PHP
77
star
9

lib-innerbrowser

InnerBrowser
PHP
73
star
10

c3

Remote CodeCoverage for Codeception. Part of Codeception testing framework.
PHP
71
star
11

module-asserts

Codeception module containing various assertions
PHP
70
star
12

robo-paracept

Robo tasks for Codeception tests parallel execution
PHP
56
star
13

module-phpbrowser

PhpBrowser module for Codeception
PHP
53
star
14

module-rest

REST module for Codeception
PHP
49
star
15

phalcon-demo

PHP
43
star
16

module-doctrine2

Doctrine2 module for Codeception
PHP
36
star
17

MockeryModule

Mockery module for Codeception
PHP
33
star
18

module-webdriver

WebDriver module for Codeception
PHP
32
star
19

SeleniumEnv

Docker image with Selenium, Xvfb, Firefox, and Chromium included
Shell
26
star
20

module-db

DB module for Codeception
PHP
23
star
21

codeception.github.com

Codeception Site
HTML
23
star
22

DomainAssert

Domain-specific assertions for PHPUnit and Codeception
PHP
22
star
23

YiiBridge

Wrapper classes required to run Yii functional tests with Codeception
PHP
20
star
24

PhantomJsEnv

Docker image with PhantomJS installed
Shell
20
star
25

base

Base Codeception distribution with minimal set of dependencies (excluding WebDriver and Guzzle)
PHP
18
star
26

AssertThrows

Assert exception handling without stopping a test. For PHPUnit 6+
PHP
18
star
27

module-yii2

Codeception module for Yii2 framework
PHP
16
star
28

module-filesystem

Filesystem module for Codeception
PHP
14
star
29

Notifier

Notification Extension for Codeception
PHP
14
star
30

WordPress-plugin-testing

A source files for WordPress plugin testing tutorial.
PHP
13
star
31

module-cli

Cli module for Codeception
PHP
13
star
32

lib-web

Code shared by module-webdriver and lib-innerbrowser or module-phpbrowser
PHP
12
star
33

codeceptjs-demo

simple demos of CodeceptJS
JavaScript
9
star
34

module-datafactory

DataFactory module for Codeception
PHP
8
star
35

symfony-module-tests

Minimal site containing functional tests for Codeception Symfony module.
PHP
8
star
36

lib-xml

Code used by module-rest and module-soap
PHP
7
star
37

yii2-tests

Sample Yii2 tests
PHP
7
star
38

module-phalcon5

Phalcon 5 module for Codeception
PHP
6
star
39

laravel-module-tests

Tests for Laravel Module
PHP
5
star
40

module-laravel

Modern Laravel module for Codeception
PHP
5
star
41

symfony1module

Module for symfony1.x framework
PHP
5
star
42

module-sequence

Sequence module for Codeception
PHP
5
star
43

module-amqp

AMQP module for Codeception
PHP
3
star
44

module-phalcon4

Phalcon 4 module for Codeception
PHP
3
star
45

docs.pt_BR

Codeception docs pr_BR translation
3
star
46

module-queue

Queue module for Codeception
PHP
3
star
47

module-phalcon

Codeception module for Phalcon framework
PHP
2
star
48

util-robohelpers

Helper methods for Robo files
PHP
2
star
49

module-laravel5

Codeception module for Laravel 5 framework
PHP
2
star
50

module-redis

Redis module for Codeception
PHP
2
star
51

e2cloud

Cloud runner for NodeJS tests
JavaScript
2
star
52

module-memcache

Memcache module for Codeception
PHP
2
star
53

Aerospike-module

Aerospike module for Codeception
PHP
2
star
54

module-zf2

Codeception module for Zend Framework 2 and 3
PHP
2
star
55

module-ftp

FTP module for Codeception
PHP
1
star
56

dbh-module

Dbh module moved out of Codeception repo
1
star
57

module-mongodb

MongoDB module for Codeception
PHP
1
star
58

module-apc

APC module for Codeception
PHP
1
star
59

module-mezzio

Codeception Module for Mezzio framework (formerly known as Zend Expressive)
PHP
1
star
60

module-laminas

Codeception module for Laminas framework
PHP
1
star
61

util-universalframework

Mock framework module used in internal tests
PHP
1
star