I think we can all agree that unit testing is pretty neat. An automated system for checking if your code changes break any functionality is almost magic, and if you aren’t sure where to get started with it, you should read my previous post Unit Testing Your Plugins. If you’ve spent some time on Github, you’ve probably heard of TravisCI, a continuous integration service that automatically runs tests for every commit and pull request on your repository. It’s super cool, very easy to set up, and free for open source projects. One of the best parts of TravisCI is its ability to run your tests in multiple environments. In one go, you can test your plugin on several versions of PHP and WordPress and catch edge cases you might run into in versions you don’t develop on. Our plugin generator by default sets up a TravisCI configuration so without any work on your part you can have your plugin tested on multiple environments for every commit. The one issue with TravisCI is you can’t easily run these tests locally, so you won’t have an idea of if your tests will run properly on all environments until they are pushed to GitHub. Enter Dockunit Dockunit is
Share This