DBus Testing Framework
Hello dbus coders out here, i’m pleased to announce the first release of a dbus testing framework.
What is it ?
You may know that testing dbus services or debugging dbus clients is not always easy since it involves creating services and wiring up things you don’t really want to do in a test script.
This framework (quite a buzzword) allows you to easily setup and run dbus services and clients in a linear python script.
Originally written for the telepathy framework (a inter process communication framework aiming to bring conversation as first-class desktop citizen) (don’t laugh rob), an heavy consumer of dbus stuff, and sponsored by Collabora.
Libnotify Sample
Just to have a teaser, here is a libnotify test sample, it opens a notification bubble and then close it and checks that the closing reason and id is correct:
self["notif"] = ("org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications")
id = self["notif"]["Notify"].call("notifname", 0, "", "title", "content",[],{}, 0)
self["notif"]["NotificationClosed"].listen()
self["notif"]["CloseNotification"].call(id)
results = self["notif"]["NotificationClosed"].wait()
assert results[0] == id
Documentation and download
You can access the full explanation and tutorial and documentation on this page. For the moment the framework is a single python file available here and you can download the sample tests file to get an idea of what kind of scripts can be written.
March 6th, 2006 at 5:05
Damn you, you cheeky monkey! Good work tho…
March 6th, 2006 at 21:21
There’s a typo in your text: http://raphael.slinckx.net/files/dbustesting-smaple.py should point to http://raphael.slinckx.net/files/dbustesting-sample.py
Nice work. I’m using it to test heavely net-monitor in epiphany
August 29th, 2006 at 16:16
I have a small question about “dbustesting.py”.
What library I should install to have “gobject” python module.
By now, running “dbustesting.py” puts:
Traceback (most recent call last):
File “dbustesting.py”, line 7, in ?
Import gobject
ImportError: No module named gobject
Thank you.
August 29th, 2006 at 16:16
Depending on your distro, the package containing gobject is the python-gobject package, or the python-gtk or pygtk, or pygobject, or combinations of the previous.
November 21st, 2006 at 23:23
Hi,
usefull framework but I have one question:
what is the licence of the software.
I cannot find anything or … overlook something.
Waiting for the answer.
Thanks.
October 1st, 2007 at 9:09
Link is dead