For a while we've been using dbus-test-runner in various DBus related projects to create a clean DBus session bus for our test suites. This also makes it so that we can test on headless systems that don't have a standard DBus configuration like what is available on most developer's desktop systems. This release we even got it into the Ubuntu archives so we could run our test suites on package builds. As our testing has gotten more mature and we've increased the number of builds on the Ubuntu QA Jenkins server we need to have better reporting, something like what gtester or Google Test can provide, which is difficult with an external utility.

To handle this we've taken dbus-test-runner, turned it entirely inside out, and created libdbustest. This allows for managing the DBus service that is being used in the test setup to be managed by the test framework. Which means you can have a DBus Session per test, or share them, or what ever you need. You've got choices that can match what you're trying to test. I created a small example using gtester that is part of the dbus-test-runner test suite. I expect that we'll be able to port of more of the various ubuntu-menu-bar projects' test suites in the coming weeks.

For those faithful users of the dbus-test-runner command line utility, no worries, it exists and just uses libdbustest. I expect no regressions as it passes the original test suite, and even maintains the code coverage numbers that we worked on in an earlier post. It does have a place in some testing, I expect it's usage to remain as another way to test applications and interfaces.

At this point I've merged the basic ideas behind what we're trying to achieve, but there's still a lot of time to work on the API and make it perfect. If you've got requirements or ideas please share them and let's make this useful for everyone. Also we need documentation and GObject introspection support so this little guy can be used for Python and Javascript testing as well. There's a lot of work to do, but I'm excited where this project is going.


posted Apr 23, 2012 | permanent link