Testing framework

Built on PHPUnit

Supports all layers of the pyramid

unit / integration / functional / acceptance

http://codeception.com

1. Download


$ composer require [--dev] codeception/codeception
						

(or with PHAR)

2. Install


$ vendor/bin/codecept bootstrap [--empty]
						
  • tests/
  • codeception.yml
  • unit / functional / acceptance test suites

3. Run


$ vendor/bin/codecept run [suite]
						

$ vendor/bin/codecept run unit
						

Actors

Representation of tests as actions of a person

(BDD anyone?)

Actors

Actor classes are generated

Actors

Functionality comes from Modules

  • Doctrine2
  • Symfony2
  • RabbitMQ

Actors

Configure in suite config

  • tests/suite.suite.yml

Scenario

Tests; BDD-style

(Optional for low-level tests)

Test formats

  • PHPUnit // you should know.. :p
  • Cept // scenario-based
  • Cest // OO scenario-based; multiple scenario's grouped

One last thing…

Environments

https://joind.in/talk/cb241