When it comes to unit testing themes, it’s a small jungle. I read on Make WordPress Core that things are changing (http://make.wordpress.org/core/2013/08/06/a-new-frontier-for-core-development/).
I searched for blogs linking to that specific post in hope to find some useful. Found this: http://ben.lobaugh.net/blog/84669/how-to-add-unit-testing-and-continuous-integration-to-your-wordpress-plugin that looks promising. Note that it focuses on plugin testing, but useful for theme unit testing also.
I’m gonna set up a specific enviroment this week (if nothing comes in between) and do a hands on tutorial for Unit testing themes (gonna try different methods).
Slightly off topic (or as a bonus), when i test themes, the tools i use for testing are the following:
All plugins are listed on the WordPress.org Plugin Repo.
- Developer (Set of tools for developers. When activating the plugin, you will be promted for what kind of development you are working on and a list of installable recomended plugins.)
- Debug Bar (Developer Recomended plugin)
- Debug Bar Extender (Developer Recomended plugin)
- Rewrite Rules Inspector (Developer Recomended plugin)
- Log Deprecated Notices (Developer Recomended plugin. This one i use a lot!)
- Regenerate Thumbnails (Developer Recomended plugin)
- Theme Check (Developer Recomended plugin. This one i use a lot!)
- ThemeForest-Check (While i don’t sell things at that place, the theme check is pretty good to my surprise. Note. You need Theme Check Plugin installed)
- Theme Mentor (Getting deeper into the code analysis of the themes).