This is an example of how to perform automated acceptance testing of a WordPress plugin using Codeception.
It is a companion to the Delicious Brains post on the same topic.
- Composer
- Java (JDK)
- PHP 5.5+
- AWS account
- Clone the repository and
cdinto it. - Make sure the permissions are correct on the
tests/tmpdirectory usingchmod -R 755 tests/tmp - Run
composer install - Copy the
codeception.dist.ymlfile tocodeception.yml - Enter your AWS key, secret and bucket name in the
S3Filesystemmodule config incodeception.yml - Configure your local database credentials in the
WPDbmodule config incodeception.yml - Add a virtual host for
wpos3-acceptance.testpointing to/tests/tmp/wpin the cloned repo
sh run-tests.sh
Optionally pass -s to start from scratch, which removes the WordPress site and re-installs. You don't need this flag the first time.