PHPackages                             aivec/codecept-docker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. aivec/codecept-docker

ActiveLibrary[Testing &amp; Quality](/categories/testing)

aivec/codecept-docker
=====================

Codeception WordPress testing with Docker.

v0.8.4(2y ago)18051[1 PRs](https://github.com/aivec/codecept-docker/pulls)3GPL-2.0-onlyPHP

Since Feb 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aivec/codecept-docker)[ Packagist](https://packagist.org/packages/aivec/codecept-docker)[ RSS](/packages/aivec-codecept-docker/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (6)Versions (41)Used By (3)

Codeception for WordPress with Docker
=====================================

[](#codeception-for-wordpress-with-docker)

A CLI wrapper for [Codeception](https://codeception.com) with [wp-browser](https://github.com/lucatume/wp-browser) that containerizes and automates environment creation for WordPress integration testing. [Jump to Quickstart Guide](#quickstart-guide)

Background (Why?)
-----------------

[](#background-why)

Until recently, integration testing in WordPress has basically been a pipe-dream. The barrier to entry for setting up a fully functioning environment **just for integration testing** is simply too high for most people.

Then came [Codeception](https://codeception.com) and [wp-browser](https://github.com/lucatume/wp-browser). Codeception is a PHP testing framework that allows developers to easily write end-to-end integration tests, while wp-browser is a module for Codeception that allows you to write tests in a WordPress context (similar to WordPress core tests). These two tools used in tandem are very powerful, but the original problem remains:

*setting up an environment...*

Docker to the Rescue
--------------------

[](#docker-to-the-rescue)

This library automates environment creation and puts everything in Docker containers. **THERE ARE NO INTERACTIVE PROMPTS**. The whole purpose of integration testing is automation. *Integration environment creation should be no different*.

The only thing required is a `codecept-docker.json` config file in the root folder of your project, which at a minimum must specify whether the root folder is a plugin or theme. The CLI then mounts the root folder in the WordPress container as a plugin/theme. This config can also be used to specify which WordPress and PHP versions to install, which plugins/themes to install, etc.

By default, the containers created are prefixed with the name of the root folder where this package is installed. **This allows having multiple non-conflicting environments on a per-project basis.**

After the environment is created, the WordPress container acts like a proxy to the `codecept` command. All tests are then invoked from within the WordPress container.

The end result is that the developer doesn't need to know any details about the environment their tests run in. Just start it and **GO!**

Main Features
-------------

[](#main-features)

- Automatic setup and configuration of `WordPress`, `MySQL`, and `phpMyAdmin` containers
- Automatic setup and configuration of [Selenoid](https://aerokube.com/selenoid/), a Docker solution for `WPWebDriver` tests
- Automatic **per-test** video recording for `WPWebDriver` tests. (ie. `myFirstTest.success.mp4`)
- Snapshot feature that greatly speeds up `WordPress` container restarts
- WP-CLI for easy customization of the `WordPress` install

Requirements
------------

[](#requirements)

- PHP 7.2^
- composer
- docker

Installation
------------

[](#installation)

```
composer require --dev aivec/codecept-docker
```

Quickstart Guide
----------------

[](#quickstart-guide)

### Create the Scaffolding

[](#create-the-scaffolding)

The following commands only need to be run the **very first time you install this package**. There are 2 steps:

First, create a `codecept-docker.json` config file:

```
# --type may be 'plugin', 'theme', or 'other'
./vendor/bin/aivec-codecept create-config --type=plugin
```

Second, generate the Codeception folders/files:

```
./vendor/bin/aivec-codecept bootstrap --with-sample-tests
```

### Start the Containers

[](#start-the-containers)

Finally, spin up the containers. If it's your very first time it may take a while:

```
./vendor/bin/aivec-codecept up
```

### Run the Tests

[](#run-the-tests)

All suites, excluding `unit` tests, must be run from within the container with the `aivec-codecept codecept` command. Lets run the sample test created for the `wpunit` suite with the folliwing:

```
./vendor/bin/aivec-codecept codecept run wpunit
```

Thats it!

The `aivec-codecept codecept` command behaves exactly like the normal `codecept` command, except that it is invoked from within the WordPress container. Use this command in place of the normal `codecept` command for running tests.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~155 days

Total

38

Last Release

951d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49274188?v=4)[Aivec LLC.](/maintainers/Aivec)[@aivec](https://github.com/aivec)

---

Top Contributors

[![EvanShaw](https://avatars.githubusercontent.com/u/6827717?v=4)](https://github.com/EvanShaw "EvanShaw (38 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aivec-codecept-docker/health.svg)

```
[![Health](https://phpackages.com/badges/aivec-codecept-docker/health.svg)](https://phpackages.com/packages/aivec-codecept-docker)
```

###  Alternatives

[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15312.0M36](/packages/magento-magento2-functional-testing-framework)[lucatume/wp-browser

A set of Codeception modules to test WordPress projects.

6424.1M182](/packages/lucatume-wp-browser)[codeception/lib-innerbrowser

Parent library for all Codeception framework modules and PhpBrowser

8744.5M89](/packages/codeception-lib-innerbrowser)[codeception/module-asserts

Codeception module containing various assertions

8654.0M1.5k](/packages/codeception-module-asserts)[allure-framework/allure-codeception

Allure Codeception integration

5212.7M9](/packages/allure-framework-allure-codeception)[codeception/module-webdriver

WebDriver module for Codeception

3933.4M328](/packages/codeception-module-webdriver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
