Addons

Official Extensions

Codeception\Extension\Logger

Log suites/tests/steps using Monolog library. Monolog should be installed additionally by Composer.

composer require monolog/monolog

Steps are logged into tests/_output/codeception.log

To enable this module add to your codeception.yml:

extensions:
    enabled: [Codeception\Extension\Logger]

Config

  • max_files (default: 3) - how many log files to keep

Codeception\Extension\Recorder

Saves screenshots of each step in acceptance tests and shows them as a slideshow. Activated only for suites with WebDriver module enabled.

recorder

Slideshows saves are saved into tests/_output/record_* directories. Open index.html to see the slideshow.

Installation

Add to list of enabled extensions

extensions:
    enabled:
        - Codeception\Extension\Recorder

Configuration

  • delete_successful (default: true) - delete records for successfully passed tests (log only failed and errored)
  • module (default: WebDriver) - which module for screenshots to use. Set AngularJS if you want to use it with AngularJS module. Generally, module should implement Codeception\Lib\Interfaces\ScreenshotSaver interface.

Examples:

extensions:
    enabled:
        Codeception\Extension\Recorder:
            module: AngularJS # enable for Angular
            delete_successful: false # show successful reports

Codeception\Extension\RunFailed

Saves failed tests into tests/log/failed in order to rerun failed tests.

To rerun failed tests just run the failed group:

php codecept run -g failed

Starting from Codeception 2.1 this extension is enabled by default.

extensions:
    enabled: [Codeception\Extension\RunFailed]

On each execution failed tests are logged and saved into tests/_output/failed file.

Codeception\Extension\SimpleOutput

This extension demonstrates how you can implement console output of your own. Recommended to be used for development purposes only.

Applications

WebCeption

Webception is a deployable web-application that allows you to run all your Codeception tests in the browser.

You can access multiple test suites and decide which tests to include in a run. It allows you start, stop and restart the process whilst watching the test results in the Console.

Chrome Extensions

Codeception Test Tools

Google Chrome extension to generate Codeception acceptance tests while using your app. GitHub

Modules

Amazon S3 Filesystem

An Amazon S3 Filesystem module.

CakePHP

Official CakePHP 3 module for Codeception.

CakeCeption

Integrate Codeception to CakePHP v2.* projects

Config

Loads params from Codeception config and pass them to test scenarios.

Date/Time

This module provides additional helpers for your test to help with date and time comparisons.

Doctrine1

Module for Doctrine 1.x ORM (deprecated in Codeception 2.1)

HttpMock

Module and extension to use HttpMock to mock external services when running Codeception tests.

IM

This module allows the testing against external messaging services as well as triggering notifications via your tests, currently supports HipChat messaging service.

MailCatcher

This module will let you test emails that are sent during your Codeception acceptance tests. It depends upon you having MailCatcher installed on your development server.

MailTrap

Codeception module to test email using Mailtrap.io

MailSMTP

This module will let you test emails using simple SMTP connection, with any provider that supports IMAP

Mockery

Integrates Mockery into Codeception tests.

Nette

Module for Nette framework.

Slim 3

This module allows you to run tests inside Slim 3 Microframework. Based on ZendExpressive Module.

Symfony1

Module for symfony 1.x framework (deprecated in Codeception 2.1)

Remote File Attachment

This module helps to upload files when using webdriver via remote connection.

VisualCeption

Visual regression tests integrated in Codeception. This module can be used to compare the current representation of a website element with an expected. It was written on the shoulders of codeception and integrates in a very easy way.

CSS Regression

CSS / Visual regression tests integrated in Codeception. This module can be used to compare the current representation of a website element with an expected based on a reference image. This module does not require any JavaScript injections in your website.

WordPress Browser and Database

An extension of Codeception own PhpBrowser and Db modules to allow for easy and streamlined WordPress themes and plugins testing.

MultiDb

Extension for work with multiple databases and switch between them. Based on original Db module. Make for codeception v.2.2

Mountebank

Stub and mock external services with mountebank.

Extensions

Codeception extensions are developed by third-party contributors and can enhance test execution flow, by listening to internal events. Read more about extensions.

Extensions should be installed via Composer.

Allure Codeception Adapter

This is a Codeception adapter for Allure Framework.

PhpBuiltinServer

Extension for starting and stopping built-in PHP server. Works on Windows, Mac, Linux.

Phantoman

Extension for automatically starting and stopping PhantomJS when running tests.

MultiDb

Extension that enables working with multiple dabatase backends and safe switching between them. It provides equivalant service as the Db module and more. Use v1.x for codeception v2.0 and v2.x for codeception v2.1.

DrushDb

DrushDb is a Codeception extension to populate and cleanup test Drupal sites during test runs using Drush aliases and the sql-sync command.

Notifier

Flexible notifications with notificator library.

RemoteDebug

Starts remote debug session during test execution.

WPBrowser, WPDatabase, WPLoader

WordPress specific extensions of PHPBrowser and Db modules to allow for more streamlined testing of themes and plugins and a WordPress automated testing suite wrapper.

Joomla-Browser

An extended Webdriver Browser to navigate through Joomla sites with Codeception.

TestStatistics

TestStatistics is a Codeception Extension to measure the performance of your tests. The extension lists your slower steps, probably meaning that the used locator is not performant. Is a smart tool to improve the speed of your Acceptance tests, and serves as example to create your own reporting extensions.

TeamCity

Integration with TeamCity CI server by service-messages

EventsScripting

Run shell scripts on events - before/after suites/environments/full test run

GherkinParam

The Codeception extension for supporting parameter notation in Gherkin scenario.

SecureShell

The Codeception module for SSH commands, SFTP access and SSH tunnels

TestRail

Integration with TestRail TestCase Management

Gherkin-Dependsload

The Codeception extension for Gherkin features to load and execute dependent scenarios. This extension provides @dependsload annotation which lets adding dependencies to gherkin scenarios.

To publish your own extension edit this page on GitHub and submit a Pull Request. Please make sure you have installation guide and green light from Travis CI.