WP Test: Unit Testing Data for WordPress Themes and Plugins

wptest
WP Test is a site that any WordPress theme or plugin developer will want to bookmark. Created by WordPress developer Michael Novotny, WP Test exists to provide test data for WordPress themes and plugins. The site is very simple and includes only a download and a demo button.

What’s in the download package? WP Test sums it up nicely:

A fantastically exhaustive set of test data to measure the integrity of your plugins and themes.

The WP Test data is based off of recommendations from WordPress’ Theme Unit Test data found in the codex. Added into the mix is Novotny’s years of experience supporting themes and plugins.

The Importance of Unit Testing

Unit testing is a recommended practice for developers who create software for other people to use. Essentially, it involves putting your code through the paces using a set of control data. If you want your theme or plugin to provide a smooth experience out of the box, then you need to perform tests before it’s released. WP Test makes unit testing easy. Download the test data and then import it into your test site using the WordPress Importer.

Check out the demo to see the full range of test data in action on a site.

The project is maintained on github if you want to follow the repository or contribute. Novotny emphasizes that WP Test is by no means a fully comprehensive set of test data and will always be evolving to provide more test scenarios. If you think WP Test is missing some important tests, please get in touch via the contact form.

15

15 responses to “WP Test: Unit Testing Data for WordPress Themes and Plugins”

  1. Emil & Justin : :

    When I created WP Test 8 months ago at WordCamp Atlanta 2013, there was nothing quiet like it. And there were (and still are) several reasons why it was needed.

    The official WordPress theme unit test data had gone over a year without any updates and there were several key tests missing, especially with the responsive web revolution. Equipped with what I had learned from 3.5 years of being QA for 8BIT in building Standard, I created WP Test with all the things that tripped us up along the way.

    Chip Bennett and others have since incorporated a majority of WP Test’s data into the official WordPress theme unit test data. Which is awesome! I am glad to help strengthen WordPress themes and plugins either through WP Test and / or the unit test data. WordPress as a whole is better for it.

    But WP Test still covers some things that the official WordPress theme unit test data chose not to incorporate, such as true non-breaking text tests in all areas it can be used, for just one example.

    While WP Test has been dormant for longer than I would have hoped, Tom McFarlin and I are in active dreaming and planning of the next iteration of WP Test, which will include even more ease of use, uncovered tests, and far greater transparency and ease of contribution to the test data.

    Thanks for the great question! Hopefully this provides some clarification.

  2. This is cool, I wish the test data would change in the future because when we go to official WordPress themes repository, find a theme with a nice screenshot, then hit preview, all we see is the almost same preview. It’s only show us different color schemes and typography.

    That is not cool, right?

    I think the test data being used right now is preventing user for seeing the potential use of a theme.

    I just come to think that;
    1). there should be some versions of test data to incorporate themes potential, like blogging test data, magazine test data, or portofolio test data. Developer can choose one version to be used when user wants to preview the theme.
    2). or the option for developer to pick ‘the right data’ for their theme’s preview. That mean the test data will be used partially on certain themes.

    Just my thought though :)

  3. @Tiyo Kamtiyono

    These are actually two different things: Theme Unit Test Data, and Theme Preview Data.

    Personally, I would like to see the previewer use the Theme Unit Test Data, but I understand the reason why it’s not: the Theme Preview Data are intended to showcase the Themes and make them look beautiful; the Theme Unit Test Data are intended to challenge/break Themes for testing.

    But agreed on the point that the Theme Preview Data could use improvement as well.

  4. @Emil Uzelac
    Sorry if my comment is sounds like ‘a baby wanting a candy’ and too noisy. I know (at least can imagine) how hard and careful each improvement on the theme development you do every day.

    I just trying to deliver my idea about the theme test data, and honestly aware that I just a BIG fans of WordPress and never contributing anything on the development. I understand that my idea is far away from realization.

    Sorry Emil.

  5. Glad I found your site. I was just about to try and write my own theme testing solution, not for development purposes but purely to review themes. The theme unit test data is great for this and has saved me sooo much time. Thanks for the article and thanks to the WordPress guys and gals for the test data.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.