Skip to content

Running tests

Danny van Kooten edited this page Jun 12, 2014 · 9 revisions

Running the WordPress SEO Test Suite

WordPress SEO is using Travis CI to run its tests after every commit. Should you want to run the WordPress SEO in your local development area you can take the following steps.

  1. Download this gist and save it as tests.sh
  2. Make sure you have a (virtual) machine with PHP, MySQL, PEAR, PHPUnit and Git installed.
  3. Open a terminal and navigate to the plugin root folder, /wp-content/plugins/wordpress-seo
  4. Run bash tests.sh.

The script will then download the WordPress development suite, activate the plugin and run PHPUnit with the configuration included in the phpunit.xml file. It will also download and install PHP_CodeSniffer and check the code against the WordPress Code Standard.

Environment variables

After running the tests.sh script it will ask you for the following environment variables to test against.

WP_MULTISITE

Possible values: 0, 1

WP_VERSION

Possible values: master, 3.9, 3.8 or any other valid develop.git.wordpress.org branch.

Clone this wiki locally