I'm using WordPress Unit Testing to develop a plugin.

The Unit Testing is the one provided by WP-CLI with the wp scaffold plugin-tests command: https://make.wordpress.org/cli/handbook/plugin-unit-tests/

From my understanding, it creates a new WordPress installation and a database, and drops it after each test to assure a clean testing environment.

This is nice, but it can get in the way of some development methodologies like TDD, since re-creating the test site takes a while.

Is it possible to make the PHP Unit scaffold provided by WordPress faster?

Perhaps by caching the test environment?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.