{"id":33,"date":"2006-03-06T01:18:44","date_gmt":"2006-03-06T00:18:44","guid":{"rendered":"https:\/\/raphael.slinckx.net\/blog\/2006-03-06\/dbus-testing-framework"},"modified":"2006-06-19T22:55:50","modified_gmt":"2006-06-19T20:55:50","slug":"dbus-testing-framework","status":"publish","type":"post","link":"https:\/\/raphael.slinckx.net\/blog\/2006-03-06\/dbus-testing-framework","title":{"rendered":"DBus Testing Framework"},"content":{"rendered":"<p>Hello dbus coders out here, i&#8217;m pleased to announce the first release of a dbus testing framework.<\/p>\n<h3>What is it ?<\/h3>\n<p>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&#8217;t really want to do in a test script.<\/p>\n<p>This framework (quite a buzzword) allows you to easily setup and run dbus services and clients in a linear python script.<\/p>\n<p>Originally written for the <a href=\"http:\/\/telepathy.freedesktop.org\">telepathy framework<\/a> (a inter process communication framework aiming to bring conversation as first-class desktop citizen) (don&#8217;t laugh rob), an heavy consumer of dbus stuff, and sponsored by <a href=\"http:\/\/projects.collabora.co.uk\">Collabora<\/a>.<\/p>\n<h3>Libnotify Sample<\/h3>\n<p>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:<\/p>\n<pre>self[\"notif\"] = (\"org.freedesktop.Notifications\",\r\n\"\/org\/freedesktop\/Notifications\",\r\n\"org.freedesktop.Notifications\")\r\n\r\nid = self[\"notif\"][\"Notify\"].call(\"notifname\", 0, \"\", \"title\", \"content\",[],{}, 0)\r\n\r\nself[\"notif\"][\"NotificationClosed\"].listen()\r\nself[\"notif\"][\"CloseNotification\"].call(id)\r\nresults = self[\"notif\"][\"NotificationClosed\"].wait()\r\n\r\nassert results[0] == id<\/pre>\n<h3>Documentation and download<\/h3>\n<p>You can access the <a href=\"https:\/\/raphael.slinckx.net\/dbustesting.php\">full explanation and tutorial and documentation on this page<\/a>. For the moment the framework is a single <a href=\"https:\/\/raphael.slinckx.net\/files\/dbustesting.py\">python file available here<\/a> and you can download the <a href=\"https:\/\/raphael.slinckx.net\/files\/dbustesting-sample.py\">sample tests file<\/a> to get an idea of what kind of scripts can be written.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello dbus coders out here, i&#8217;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&#8217;t really want to do in a test script. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[39,22,17],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-planet-gnome","category-software","tag-collabora","tag-dbus","tag-telepathy"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":0,"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raphael.slinckx.net\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}