aztecweb / aztecweb-wp-browser
Codeception/wp-browser extensions for WordPress plugin testing.
Requires
- php: ^8.0
- codeception/codeception: ^5.0
- lucatume/wp-browser: ^4.3
- symfony/filesystem: >=4.4.24 <8.0
- symfony/process: >=4.4.24 <8.0
Requires (Dev)
- codeception/module-webdriver: ^3.1
- composer/installers: ^2.2
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- phpcompatibility/php-compatibility: ^10.0@alpha
- phpstan/phpstan: ^2.0
- roots/wordpress-core-installer: ^4.0
- roots/wordpress-no-content: ^6.8
- slevomat/coding-standard: ^8.0
- squizlabs/php_codesniffer: ^3.7
- wp-cli/wp-cli-bundle: ^2.10
- wpackagist-plugin/sqlite-database-integration: ^2.1
- wpackagist-plugin/woocommerce: ^9.0
- wpackagist-theme/storefront: ^4.6
This package is auto-updated.
Last update: 2026-06-03 02:39:52 UTC
README
Codeception modules and method traits for WordPress + WooCommerce acceptance
testing, layered on top of lucatume/wp-browser.
Running the test suite
The test environment is a slim Docker image published to GitHub Container Registry (GHCR) — PHP, Chromium, chromedriver, SQLite and Composer. WordPress, WooCommerce and the library source come from a bind-mount of the repository, so the image does not need to rebuild every time the code changes.
Quick start
bin/test composer install # one-time: install PHP dependencies bin/test bash resources/install.sh # one-time: bootstrap the SQLite WP site bin/test # codecept run
bin/test is a thin wrapper that runs any command inside the image with the
repo bind-mounted at /var/www/html. With no arguments, it runs the default
test suite. You can also invoke docker directly:
docker run --rm -it \
-v "$PWD:/var/www/html" \
-w /var/www/html \
ghcr.io/aztecweb/aztecweb-wp-browser-runner:php8.4 \
codecept run acceptance
Image tags
The image is published per PHP variant (:php8.0, :php8.4), plus an
immutable per-build content tag (:vYYYYMMDDThhmmssZ-php{N}) generated from
the workflow's UTC build timestamp.
Building and publishing
A maintainer fires the
build-test-runner workflow by
hand from the GitHub Actions UI (or gh workflow run build-test-runner.yml).
There is no push trigger or cron schedule yet — automatic rebuilds are being
designed separately in
#13.
Browsing the site from the host
The container's PHP server is only reachable inside the container during a test
run. To open the site in a host browser — for instance to inspect the installed
state or reproduce a failing scenario manually — use bin/serve:
bin/serve # http://localhost:8080/ (reads WP_SERVER_PORT from .env)
bin/serve starts WP-CLI's built-in server bound to 0.0.0.0 and publishes
the port to the host. Press Ctrl-C to stop it. The server runs in the
foreground; open a second terminal for any other bin/test commands.
Note:
bin/serveis for manual inspection only. The acceptance suite manages its own server via theBuiltInServerControllerextension — do not run both at the same time on the same port.
Overriding the image
AZTEC_TEST_IMAGE=ghcr.io/aztecweb/aztecweb-wp-browser-runner:php8.0 \
bin/test codecept run acceptance
Running against PHP 8.0
The default image ships PHP 8.4 and the committed composer.lock is resolved
against PHP 8.4. Running against the PHP 8.0 image requires resolving
dependencies fresh inside that image, because some packages locked for 8.4 do
not support 8.0.
# Remove the vendor directory so Composer starts clean rm -rf vendor # Resolve dependencies for PHP 8.0 (rewrites composer.lock) AZTEC_TEST_IMAGE=ghcr.io/aztecweb/aztecweb-wp-browser-runner:php8.0 \ bin/test composer update # Bootstrap the site (required after a clean vendor install) AZTEC_TEST_IMAGE=ghcr.io/aztecweb/aztecweb-wp-browser-runner:php8.0 \ bin/test bash resources/install.sh # Run the suite AZTEC_TEST_IMAGE=ghcr.io/aztecweb/aztecweb-wp-browser-runner:php8.0 \ bin/test
Note:
composer updaterewritescomposer.lockwith PHP-8.0-compatible package versions (Symfony 6.x, older Codeception 5.x releases). Do not commit the rewritten lock file — restore it afterwards withgit checkout composer.lockand reinstall for your usual image:bin/test composer install.