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
cd
into it. - Make sure the permissions are correct on the
tests/tmp
directory usingchmod -R 755 tests/tmp
- Run
composer install
- Copy the
codeception.dist.yml
file tocodeception.yml
- Enter your AWS key, secret and bucket name in the
S3Filesystem
module config incodeception.yml
- Configure your local database credentials in the
WPDb
module config incodeception.yml
- Add a virtual host for
wpos3-acceptance.test
pointing to/tests/tmp/wp
in 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.