q

News from Habari

A testing 30 days

Q

An important way to promote the quality of software projects is to provide a good test suite. While Habari has had unit tests for a long time, the coverage and quality of the tests hasn't really made the suite "good" enough. We're currently making an effort to improve this.

To make the tests simple to run, we've made them into a plugin, which you can checkout or download from github. We're also extending the plugin to include acceptance tests (simulating a user actually using Habari) and soon plugins and themes will be able to register tests to run. And, yes, that means that the test plugin will include tests. How meta.

Taking inspiration from Matt Cutts, on 15 March I'll start a project to try to improve Habari's testing every day for 30 days.

Of course, open source software development runs according to the itches that people have to scratch, and all too often testing (and documentation, but that's for another 30 days) doesn't make people very itchy. I completely understand that, but if you feel so inclined, I'd love us to work together to make the testing better, stronger, faster, more flexible, more attractive, and even fun. Hang out on IRC if you'd like to help.

I'll update this post as we go along to record what we achieve.

Day 1

Debugged (but did not solve) an issue running tests with an SQLite database. It seems the tests lock the database, causing the plugin to timeout.

Day 2

Real testing. Made the tests for retrieving posts deterministic.

Day 3

Continue to work on testing posts retrieval.

Days 4 to 7

Add a readme with a big warning, because the tests plugin will delete your data, so don't use it on a production installation. Some further posts tests (it's central to Habari, and there's more to come), improvements to the UUID tests, and work on code coverage and the omni branch for feature tests. Most of this was Mike and Owen, not me.