Testing framework – 1. Download – Actors



Testing framework – 1. Download – Actors

0 0


p2p-codeception-slides


On Github Miljar / p2p-codeception-slides

  • Wie was er vorige keer? Afbeelding schaamteloos overgenomen van Bert
  • Wie schrijft unit tests?
  • Wie schrijft integration tests?
  • Wie schrijft functional tests?
  • Wie schrijft acceptance tests?

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
31 modules

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