# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.wptherightway.org/testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
