Skip to content

Running tests

Danny van Kooten edited this page Jun 13, 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. Make sure you're on a (virtual) machine with PHP, MySQL, PEAR, PHPUnit and Git installed.
  2. Open a terminal and navigate to the plugin root folder, /wp-content/plugins/wordpress-seo
  3. Create a file with the contents of this gist and name it tests.sh
  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 to 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