WordPress The Right Way
English en-US
English en-US
  • WordPress The Right Way
  • Getting Started
  • Debugging
    • Error Logging
    • Handling Errors
    • Tools
    • Constants of wp-config.php
  • Data
  • Core
  • Code Style Guide
  • I18n
  • JavaScript
  • Multisite
  • Queries
    • User Queries
    • SQL
    • Taxonomy and Term Queries
    • Comment Queries
    • Post Queries
  • Routing
    • The Main Loop & Template Loading
    • What Are Query Variables and Where Do They Come From?
    • Clashes, Slugs, & Debugging
    • Rewrite Rules
  • Security
    • Secure HTTP
    • Standalone PHP Files
  • Servers And Deployment
    • Migrations
    • WP CLI
  • Templates
  • Testing
    • Testing Theory
      • Test Driven Development
      • Unit Testing
      • Behavior Driven Development
    • Testing Plugins
    • WP_UnitTestCase
  • Widgets
  • Community
  • Credits
Powered by GitBook
On this page
  • WP Test & Theme Test Data
  • Theme review tester plugin
  • Integration vs unit vs behavioural testing

Testing

It's important that you test your code and your themes, but that takes time. Luckily there are tools and methods of simplifying and automating these things. This chapter is going to cover basic preventative testing, and tools to help catch bugs and things you may have missed.

WP Test & Theme Test Data

  • Good for testing content

  • It's a content export file

  • Contains lots of posts and categories of varying types to test as many possible combinations as possible

  • Useful for testing themes and unhandled scenarios such as posts without titles, giant nav menus, or very long tag names.

Theme review tester plugin

  • Good for testing theme completion

  • A plugin that runs several automated tests on the current theme

  • Checks for things the theme review team checks for when submitting themes to wordpress.org

  • Includes things such as comment forms, showing tags and categories, displaying author names, etc

Integration vs unit vs behavioural testing

  • Good for testing code and as a development methodology

  • Automated testing

  • Explain the difference between the three

  • Mention they're covered in more depth in sub-chapters

PreviousTemplatesNextTesting Theory

Last updated 4 years ago